Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
75 stars 81 forks source link

Cannot open workflow designer in VS Code 1.80.2 #3068

Closed novenera closed 1 year ago

novenera commented 1 year ago

Describe the Bug with repro steps

  1. Select Create new Logic App workspace. image

  2. Follow the prompts which would create the following workspace with a folder for Function App project and another for Logic App project. image

  3. Right-click workflow.json and choose Open Designer image

  4. Workflow designer does not start. image

  5. Logs returned as follows: image

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": {
      "Call_a_local_function_in_this_logic_app": {
        "type": "InvokeFunction",
        "inputs": {
          "functionName": "TestFunction",
          "parameters": {
            "zipCode": 85396,
            "temperatureScale": "Celcius"
          }
        },
        "runAfter": {}
      },
      "Response": {
        "type": "Response",
        "kind": "http",
        "inputs": {
          "statusCode": 200,
          "body": "@body('Call_a_local_function_in_this_logic_app')"
        },
        "runAfter": {
          "Call_a_local_function_in_this_logic_app": [
            "Succeeded"
          ]
        }
      }
    },
    "triggers": {
      "When_a_HTTP_request_is_received": {
        "type": "Request",
        "kind": "Http",
        "inputs": {}
      }
    },
    "contentVersion": "1.0.0.0",
    "outputs": {}
  },
  "kind": "Stateless"
}

Screenshots or Videos

No response

Browser

Debugging from VS Code 1.80.2

Additional context

Logic Apps (Standard) VS Code extension v2.45.4 Azurite v3.25.0 Azure Functions v1.12.2 Azure Function Core Tools Version 4.0.4865 Function Runtime Version: 4.12.2.19454 .NET 7.0.306

AB#24719974

Eric-B-Wu commented 1 year ago

@novenera thanks for reporting this, to confirm, is this happening on vscode Logic Apps version 1.80.2? cause it may just be that version that is not working. I'd recommend seeing if updating to latest version 2.45.4 fixes your issue. If not we can look into it further

ccastrotrejo commented 1 year ago

Hi @novenera, did you try to create a normal/simple logic apps project or did you indeed want a workspace with a functions and logic app projects. Just want to confirm if we should change the wording of the second one?

novenera commented 1 year ago

@novenera thanks for reporting this, to confirm, is this happening on vscode Logic Apps version 1.80.2? cause it may just be that version that is not working. I'd recommend seeing if updating to latest version 2.45.4 fixes your issue. If not we can look into it further

Hi @Eric-B-Wu - I am using Logic Apps (Standard) VS Code extension v2.45.4

Also sharing the current version of extensions it depends on: Azurite v3.25.0 Azure Functions v1.12.2 Azure Function Core Tools Version 4.0.4865 .NET 7.0.306

novenera commented 1 year ago

Hi @novenera, did you try to create a normal/simple logic apps project or did you indeed want a workspace with a functions and logic app projects. Just want to confirm if we should change the wording of the second one?

Hi @ccastrotrejo - I created a workspace with a Function and Logic App project, no additional logic added. See screenshots above.

swghimire commented 1 year ago

hi @novenera would you mind sharing your csproj file here/ the contents of the file?

novenera commented 1 year ago

LAWorkspace.zip

hi @novenera would you mind sharing your csproj file here/ the contents of the file?

@swghimire - See attached.

swghimire commented 1 year ago

For some reason you are missing a launch.json file in the LogicApps/.vscode directory. Can you please insert a file named "launch.json" in LogicApp/.vscode? And add this as the file content. I'm not sure if that will fix the entire issue, but that is something that came to my immediate attention.

{
  "version": "0.1.0",
  "configurations": [
    {
      "name": "Attach to logic app",
      "type": "coreclr",
      "request": "attach",
      "processId": "${command:azureLogicAppsStandard.pickProcess}"
    }
  ]
}

Additionally, please check the version of azure core tools you have in C: .azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows and sometimes it can help to delete the folder and when you open the logic app in the designer it will install a new version for you. The most up to date version should be 1.28.4.

ccastrotrejo commented 1 year ago

Thanks @swghimire. I am going to check if there was a code change or anything on why the file wasn't created.

novenera commented 1 year ago

C: .azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows

Hi @swghimire -

I have added launch.json to LogicApp.vscode as follows:

image

I also checked the version of Azure Function Core Tools and see that I have v 1.28.4...

image

Nonetheless, I deleted that folder to force reinstall.

image

Tried opening the workflow designer again and got the same error:

image

However, I did some digging and found that this might be related to issue with Azure Function Core tools and .NET 6.0 needed to be reinstalled (https://github.com/Azure/azure-functions-core-tools/issues/3115). I did just that and now I am able to load the workflow designer.

image

Thanks for your help @swghimire and @ccastrotrejo !

ccastrotrejo commented 1 year ago

I am glad it worked out. Thanks for letting us know about the solution!