3

Trying to follow this tutorial.

When I right click the workflow.json and select Open in Designer, I finally get the following message.

[2021-11-11T16:25:32.880Z] A host error has occurred during startup operation 'ae98f37d-d7d4-4131-920d-a725de7dc6cb'.
[2021-11-11T16:25:32.880Z] Microsoft.Extensions.DependencyInjection: Cannot access a disposed object.
[2021-11-11T16:25:32.880Z] Object name: 'IServiceProvider'.
9:56:42 pm: Running command: "func host start --port 8000"...

Azure Functions Core Tools
Core Tools Version:       4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf  (64-bit)
Function Runtime Version: 4.0.1.16815

[2021-11-11T16:26:43.913Z] ExtensionStartupType EventHubsWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.2.0.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.EventHubs to 4.2.0 or later.
[2021-11-11T16:26:43.917Z] A host error has occurred during startup operation 'c15e2264-73c8-4f04-b0fd-7498d70f31c9'.
[2021-11-11T16:26:43.917Z] Microsoft.Azure.WebJobs.Script: One or more loaded extensions do not meet the minimum requirements. For more information see https://aka.ms/func-min-extension-versions.
[2021-11-11T16:26:43.917Z] ExtensionStartupType EventHubsWebJobsStartup from assembly 'Microsoft.Azure.WebJobs.EventHubs, Version=4.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.2.0.0. Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.EventHubs to 4.2.0 or later.
[2021-11-11T16:26:43.917Z] .
Value cannot be null. (Parameter 'provider')
[2021-11-11T16:26:43.945Z] A host error has occurred during startup operation '13d7a2b9-4b0a-494f-a11a-0d4862a718b1'.
[2021-11-11T16:26:43.945Z] Microsoft.Extensions.DependencyInjection: Cannot access a disposed object.
[2021-11-11T16:26:43.945Z] Object name: 'IServiceProvider'.

I even updated the csproj file with the command

dotnet add package Microsoft.Azure.WebJobs.Extensions.EventHubs --version 4.3.0

But the problem persisted.

Azure Logic App with Visual Studio Code

Also as you can see, the designer tries to fetch something, and it says it Failed to fetch

And finally as you can see in the bottom right of the image, I get this message

Workflow validation failed: request to http://localhost:8000/runtime/webhooks/workflow/api/management/workflows/Stateful1/validate?api-version=2019-10-01-edge-preview failed, reason: connect ECONNREFUSED 127.0.0.1:8000. The source indicated is Azure Logic Apps (Standard) (Extension)

Any ideas?

I found one more YouTube tutorial but I am not able to get that working on my machine.

Raised issue here as well on github.

3
  • On the surface, VS Code can't talk to port 8000. Could be a windows firewall rule, could be antivirus, etc. Have you tried hanging the func host start port of Azure functions core tools to something other than 8000? Next, I see some warnings about Microsoft.Azure.WebJobs.EventHubs not being at latest 4.2.0.0.0. You mention updating a different package, Do you need to update your .csproj file and get latest? Lastly, you are out really out there on azure functions runtime 4.0 which was juuuust released a few weeks ago. Consider downgrading to the 3.x runtime? Commented Nov 12, 2021 at 3:58
  • 2
    I ran into this and another issue with the .NET 3.1 SDK not being installed after a VS 2022 install. Apparently the build tools for the ~3 version of the project runtime rely on that version of the SDK and I only had the 5.0 and 6.0 SDK versions installed. Installing the .NET 3.1 SDK and the latest stable 3.0 version of the Azure Functions Core Tools fixed it all up for me. Commented Nov 15, 2021 at 19:23
  • @scottrudy Thx, this works for me. 6.0 SDK should have supported .net 3. Commented Mar 2, 2022 at 17:08

2 Answers 2

7

i had the same issue. In my case the solution was to go under Control Panel and uninstall Azure Function Core Tool (4.x) (if available). Afterwards open your Powershell and run following command:

npm install -g azure-functions-core-tools@3 --unsafe-perm false

Sign up to request clarification or add additional context in comments.

Comments

3

Yes, Finally. Its the Azure Functions Core Tools thats doing the mischief. Thanks @NDDev

I had this 4.0.397 and this is the problem.

Azure Functions Code Tools 4.0.3971 giving the problem

Now get the right version from here.

Ensure you select the 3.x

Azure Functions Code Tools 3.0 for windows on portal

Azure Functions Code Tools 3.0.3904

Azure Logic Apps UI on Visual Studio Code

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.