Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
349 stars 291 forks source link

Value cannot be null. (Parameter 'provider') - Macbook #1009

Closed JackBruceShell closed 3 months ago

JackBruceShell commented 3 months ago

Describe the Bug with repro steps

  1. Open workflow in Designer

What type of Logic App Is this happening in?

Standard (VSCode)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "actions": {},
    "contentVersion": "1.0.0.0",
    "outputs": {},
    "triggers": {}
  },
  "kind": "Stateful"
}

Screenshots or Videos

Output:

15:17:18: Running command: "func host start --port 8001" with pid: "53788"…

Azure Functions Core Tools

Core Tools Version: 4.0.5030 Commit hash: N/A (64-bit)

Function Runtime Version: 4.15.2.20177

[2024-03-14T15:17:19.475Z] A host error has occurred during startup operation '93dbf60e-57d3-453e-99f8-f7826b74540a'.

[2024-03-14T15:17:19.475Z] Microsoft.Azure.Workflows.WebJobs.Extensions: Could not load type 'Microsoft.Azure.WebJobs.Host.Listeners.IListenerDecorator' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.36.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Value cannot be null. (Parameter 'provider')

Browser

Edge

Additional context

No response

AB#27185602

ccastrotrejo commented 3 months ago

Hi @JackBruceShell thanks for raising this issue. It does seem to be a problem with the extension bundle. I will transfer the issue to the backend backlog, and I will reach out to one of the engineers.

In the meantime, is there any way you can execute the func host start --verbose --port 8001 command? This will show all the logs and will help to triage the issue.

JackBruceShell commented 3 months ago

Hi @ccastrotrejo

I have ran the command and attached as many logs as I could grab from the terminal. Hope this helps.

logs.txt

Anything else to try whilst we wait for the engineers?

Thanks.

ccastrotrejo commented 3 months ago

Hey @JackBruceShell I took a look at the txt that you attached and I couldn't see any issue in the logs. Were you able to see any error in your side?

Lets do two things: 1.- Could you please execute in the vscode terminal with your logic apps project open the following command? /Users/<your username>/.azurelogicapps/dependencies/FuncCoreTools/func host start --verbose --port <any number, e.g 8005> executing with the path will help us to make sure we start the functions process we do really

  1. Close your vscode, Go to /Users/<your username>/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/ and delete all the folders over there and restart vscode. This will install a new extension bundle from scratch
JackBruceShell commented 3 months ago

Hi @ccastrotrejo

  1. I do not have that file path

    Screenshot 2024-03-14 at 22 33 45
  2. Tried this, still receiving the same error.

ccastrotrejo commented 3 months ago

@JackBruceShell do you have any values in these vscode extension settings?

image
JackBruceShell commented 3 months ago

@ccastrotrejo I did not have any values in there...

Steps taken:

  1. Add values like yours above
  2. Exit and Quit VSCode
  3. Re-open VSCode and let dependencies download

Results:

Screenshot 2024-03-14 at 22 53 35

Looks to be working now so I can open the designer correctly.

ccastrotrejo commented 3 months ago

@JackBruceShell I am glad it's working now. So, the reason for this is because starting with version 2.81.5, the extension includes a dependency installer that automatically installs all the required dependencies. We did this to avoid users having different installations and versions, therefore we installed the ones we know will work and make it smoother. You can read more about it here

JackBruceShell commented 3 months ago

Hi @ccastrotrejo thanks for this, very helpful!

The next problem I always seem to have is the below.

Screenshot 2024-03-15 at 08 03 55

Following instructions from: https://learn.microsoft.com/en-us/azure/logic-apps/create-single-tenant-workflows-visual-studio-code#run-test-and-debug-locally - I always run into the issue now where I am unable to get a Callback URL from the overview.

Any thoughts appreciated, thanks!

ccastrotrejo commented 3 months ago

Hey @JackBruceShell , whenever this kind of issue occurs while opening the overview page its due to the runtime server not being up. Did you follow the step #3 in the run, test and debug locally section?

image
JackBruceShell commented 3 months ago

@ccastrotrejo

Yes I had already started the debugging sessions, please see below.

Screenshot 2024-03-25 at 09 45 55
ccastrotrejo commented 3 months ago

Hey @JackBruceShell

1.- Is your workflow still empty? It does seem that there isn't a trigger in it

2.- Does your Func Core Tools Binary Path extension setting have a value like this? /Users/<username>/.azurelogicapps/dependencies/FuncCoreTools/func

image

3.- Does your .vscode/tasks.json have a similar structure?

image

It also seems that the func host start is not attaching to the /.azurelogicapps/dependencies/FuncCoreTools/ dependencies that we download for users. It seems that is using your own function core tools

JackBruceShell commented 3 months ago

@ccastrotrejo

I have opened it yesterday and now able to get the callback URL. Not sure what changed but maybe an update forced it to be working.

  1. Start Azurite
  2. Start Debugging
  3. Open Overview
  4. Callback URL now visible
Screenshot 2024-03-26 at 12 27 13

Thanks for your help on this.

ccastrotrejo commented 3 months ago

@JackBruceShell I am glad to hear that!