microsoft / DurableFunctionsMonitor

A monitoring/debugging UI tool for Azure Durable Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[VS Code Extension] Cannot connect to task hubs (`Func: Value cannot be null. (Parameter 'provider')`)

YaroslavKormushyn opened this issue · comments

Hello,

I'm not being able to connect to local (azurite) or remote task hubs using the VS Code extension.
After waiting for the backend to respond, I'm receiving a Func: Value cannot be null. (Parameter 'provider') error.

Installed the latest v4.x Azure Func Core Tools from here.
I'm running the latest v6.0 extension version on 1.73.1 VS Code, Windows 11 Pro 22H2.
.NET 6 runtime is installed.

Solved.

Completely uninstalled .NET 6.0 SDK and Azure Func Core Tools then did a complete reinstall of them.
This might be related to Azure/azure-functions-core-tools#3115

Same problem (Value cannot be null. (Parameter 'provider') when opening a task hub. The re-install did not work for me.

image

@codermrrob , as a quick workaround, you can always fall back to the previous backend version:

But can you try to enable logs and post the log output here?

Hi @scale-tone, thanks for the reply. Here is the log output:

Attempting to start the backend from c:\Users\mrrob\.vscode\extensions\durablefunctionsmonitor.durablefunctionsmonitor-6.0.0\backend on http://localhost:37072/a/p/i...
Azure Functions Core Tools
Core Tools Version:       4.0.4895 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.13.0.19486

Warning: Proxies are not supported in Azure Functions v4. Instead of 'proxies.json', try Azure API Management: https://aka.ms/AAfiueq
[2022-12-08T04:34:01.007Z] Csproj not found in c:\Users\mrrob\.vscode\extensions\durablefunctionsmonitor.durablefunctionsmonitor-6.0.0\backend directory tree. Skipping user secrets file configuration.
[2022-12-08T04:34:01.325Z] A host error has occurred during startup operation '8669cfab-09ec-4b21-803a-deb163bf2dcd'.
[2022-12-08T04:34:01.325Z] Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
ERROR: Value cannot be null. (Parameter 'provider')

The extension is correctly identifying the hub in the storage account, but I receive this error when trying to attach.
I can confirm that switching the back end version from default to .Net Core 3.1 as a work around does work and I can connect to hubs again.

Thanks for that, @codermrrob .
Your logs indicate that it must be the same issue as azure-functions-core-tools/issues/3115.
Can you try to reinstall .NET 6 and Functions Core Tools, as suggested there, and see if it helps?

Adding a few details here:

Completely uninstalled .NET 6.0 SDK and Azure Func Core Tools then did a complete reinstall of them

By this, I meant no repairing, no overwrite installation, simply:

  1. Go through all packages (programs) related to .NET 6 and Function Core Tools
  2. Remove them via Programs and Features (using Windows 11)
  3. Restart the machine (it always helps, won't make it worse)
  4. Install the latest versions of .NET 6 SDK and Function Core Tools
    4*. I may as well have reinstalled the extension in VS Code, to be sure, but I cannot confirm that it's necessary