Azure / LogicAppsUX

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

Error in determining project root. Please confirm project structure is correct. #5458

Open Viktorh89 opened 4 weeks ago

Viktorh89 commented 4 weeks ago

Describe the Bug with repro steps

Start new LA workspace project

Select with new LA with "custom code"

Try to view designer

What type of Logic App Is this happening in?

Standard VSCODE

Which operating system are you using?

Windows

Are you using new designer or old designer

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

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

VScode

Additional context

No response

skastberg commented 2 weeks ago

For some reason azureLogicAppsStandard.projectSubpath is not set on project creation. You need to set it to reference the LogiApp folder. Then you can edit the workflow.

image

skastberg commented 2 weeks ago

Forget the previous response @Viktorh89 most likely is that you have not opened the workspace but just the folder. At least for me when I happen to open the folder I get the error if I open with the workspace file it works as expected.

mikeholdorf commented 2 weeks ago

We are hitting this same error. It works only on the machine that created the Workspace. We have the code checked in and if another developer clones the project and try to open a workflow in the designer, it states that there is an error in determining the root. Something must be getting hardcoded to a path somewhere, but we cannot figure it out. If anyone has a fix, please let us know.

skastberg commented 1 week ago

@mikeholdorf after your post I did a test to see if I could sort it out with no success. I'm using the latest extension 4.57.7 After recreating the workspace file (it was in .gitignore) and changing the paths in solution file that was created I was able to open the designer. When it comes to having a function in the same project The metadata files are created when I build the function. That said I'm not able to have the environment to use the "Call a local function" action. I get "Failed to retrieve dynamic inputs", see output below.

Output for Logic Apps NodeJs Binaries: C:\\Users\\...username...\\.azurelogicapps\\dependencies\\NodeJs 11:39:34 PM: No connection keys found to verify 11:39:35 PM: Running command: "C:\\Users\\...username...\\.azurelogicapps\\dependencies\\FuncCoreTools\\func host start --port 8002" with pid: "59168"... Azure Functions Core Tools Core Tools Version: 4.0.5907 Commit hash: N/A +807e89766a92b14fd07b9f0bc2bea1d8777ab209 (64-bit) Function Runtime Version: 4.834.3.22875 FuncCoreTools Binaries: C:\\Users\\...username...\\.azurelogicapps\\dependencies\\FuncCoreTools Functions: NetFxLanguageWorkerFunction: NetFxTrigger XsltNetFxLanguageWorkerFunction: NetFxTrigger For detailed output, run func with --verbose flag. DotNetSDK Binaries: C:\\Users\\...username...\\.azurelogicapps\\dependencies\\DotNetSDK 11:39:38 PM: Azure Logic Apps Standard Runtime Dependencies validation and installation completed successfully. Failed to find: c:\\Repos\\logicapp-function-workspace\\lafunc-ws\\LogicApp\\workflow-designtime\\.vscode\\tasks.json [2024-09-05T21:39:38.273Z] Worker process started and initialized. [2024-09-05T21:39:42.653Z] Host lock lease acquired by instance ID '0000000000000000000000006E30E539'. [2024-09-05T21:40:35.879Z] Error message: correlationId='03ae11d3-3af2-40db-95c1-2adf16d073b1', operationName='ErrorResponseHandling.GetErrorResponseMessage.POST/RUNTIME/WORKFLOW/MANAGEMENT/LOCALFUNCTIONOPERATION/GETOUTPUTSCHEMA/', message='Http request failed with unhandled exception of type 'NullReferenceException' and message: 'System.NullReferenceException: Object reference not set to an instance of an object. [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Data.Engines.BuiltInOperationDynamicRequestEngine.GetOutput(IFlowConfigurationHolder holder, ServiceProviderDynamicInvokeInputDefinition requestDefinition) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.InvokeBuiltInDynamicRequest(String apiName, String operationName, ServiceProviderDynamicInvokeInputDefinition requestInputDefinition) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.BuiltInDynamicInvoke(String apiName, String apiOperationName, CancellationToken cancellationToken) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.BaseFlowExtensionRouteInitializer.Invoke(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionHttpRequestHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionAuthorizationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionErrorResponseHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken)'.', exception='System.NullReferenceException: Object reference not set to an instance of an object. [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Data.Engines.BuiltInOperationDynamicRequestEngine.GetOutput(IFlowConfigurationHolder holder, ServiceProviderDynamicInvokeInputDefinition requestDefinition) [2024-09-05T21:40:35.879Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.InvokeBuiltInDynamicRequest(String apiName, String operationName, ServiceProviderDynamicInvokeInputDefinition requestInputDefinition) [2024-09-05T21:40:35.880Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.BuiltInDynamicInvoke(String apiName, String apiOperationName, CancellationToken cancellationToken) [2024-09-05T21:40:35.880Z] at Microsoft.Azure.Workflows.Web.BaseFlowExtensionRouteInitializer.Invoke(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:35.880Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionHttpRequestHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:35.880Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionAuthorizationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:35.880Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionErrorResponseHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken)', organizationId='', activityVector='IN.00', additionalProperties='{"ParentActivityId":"00-c12be268e29f7abdc806c1c39e64c748-1b2a6d482d1d6c92-00"}', extensionVersion='1.81.39.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='03ae11d3-3af2-40db-95c1-2adf16d073b1'. [2024-09-05T21:40:35.883Z] Incoming HTTP request ends with server failure: correlationId='03ae11d3-3af2-40db-95c1-2adf16d073b1', authorizationSource='Management', authorizationAction='', operationName='POST/API/MANAGEMENT/OPERATIONGROUPS/OPERATIONS/DYNAMICINVOKE', httpMethod='POST', hostName='localhost', targetUri='http://localhost:8002/runtime/webhooks/workflow/api/management/operationGroups/localFunctionOperation/operations/getOutputSchema/dynamicInvoke?api-version=2018-11-01', userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.93.0 Chrome/124.0.6367.243 Electron/30.4.0 Safari/537.36', clientRequestId='', clientSessionId='', clientIpAddress='', clientApplicationId='', apiVersion='2018-11-01', contentLength='-1', serviceRequestId=':03ae11d3-3af2-40db-95c1-2adf16d073b1', durationInMilliseconds='28', httpStatusCode='500', exceptionMessage='', errorCode='', failureCause='Service', errorMessage='', referer='', commandName='', parameterSetName='', contentType='application/json; charset=utf-8', contentEncoding='', armServiceRequestId='', organizationId='', activityVector='IN', locale='en-US', additionalProperties='{"ParentActivityId":"00-c12be268e29f7abdc806c1c39e64c748-1b2a6d482d1d6c92-00"}', targetResourceProvider='', targetResourceType='', extensionVersion='1.81.39.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='03ae11d3-3af2-40db-95c1-2adf16d073b1'. [2024-09-05T21:40:36.051Z] Error message: correlationId='4fe13f75-6bd1-4872-9142-8ce1c2387ae4', operationName='ErrorResponseHandling.GetErrorResponseMessage.POST/RUNTIME/WORKFLOW/MANAGEMENT/LOCALFUNCTIONOPERATION/GETPARAMETERS/', message='Http request failed with unhandled exception of type 'NullReferenceException' and message: 'System.NullReferenceException: Object reference not set to an instance of an object. [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Data.Engines.BuiltInOperationDynamicRequestEngine.GetParametersDynamicList(IFlowConfigurationHolder holder, ServiceProviderDynamicInvokeInputDefinition requestDefinition) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.InvokeBuiltInDynamicRequest(String apiName, String operationName, ServiceProviderDynamicInvokeInputDefinition requestInputDefinition) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.BuiltInDynamicInvoke(String apiName, String apiOperationName, CancellationToken cancellationToken) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.BaseFlowExtensionRouteInitializer.Invoke(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionHttpRequestHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionAuthorizationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionErrorResponseHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken)'.', exception='System.NullReferenceException: Object reference not set to an instance of an object. [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Data.Engines.BuiltInOperationDynamicRequestEngine.GetParametersDynamicList(IFlowConfigurationHolder holder, ServiceProviderDynamicInvokeInputDefinition requestDefinition) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.InvokeBuiltInDynamicRequest(String apiName, String operationName, ServiceProviderDynamicInvokeInputDefinition requestInputDefinition) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.Controllers.EdgeDesignerApiController.BuiltInDynamicInvoke(String apiName, String apiOperationName, CancellationToken cancellationToken) [2024-09-05T21:40:36.051Z] at Microsoft.Azure.Workflows.Web.BaseFlowExtensionRouteInitializer.Invoke(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:36.052Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionHttpRequestHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:36.052Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionAuthorizationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) [2024-09-05T21:40:36.052Z] at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionErrorResponseHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken)', organizationId='', activityVector='IN.00', additionalProperties='{"ParentActivityId":"00-098e0297f438c0b91e4e9ad3612a4c86-eb937c70405cb7d4-00"}', extensionVersion='1.81.39.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='4fe13f75-6bd1-4872-9142-8ce1c2387ae4'. [2024-09-05T21:40:36.052Z] Incoming HTTP request ends with server failure: correlationId='4fe13f75-6bd1-4872-9142-8ce1c2387ae4', authorizationSource='Management', authorizationAction='', operationName='POST/API/MANAGEMENT/OPERATIONGROUPS/OPERATIONS/DYNAMICINVOKE', httpMethod='POST', hostName='localhost', targetUri='http://localhost:8002/runtime/webhooks/workflow/api/management/operationGroups/localFunctionOperation/operations/getParameters/dynamicInvoke?api-version=2018-11-01', userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.93.0 Chrome/124.0.6367.243 Electron/30.4.0 Safari/537.36', clientRequestId='', clientSessionId='', clientIpAddress='', clientApplicationId='', apiVersion='2018-11-01', contentLength='-1', serviceRequestId=':4fe13f75-6bd1-4872-9142-8ce1c2387ae4', durationInMilliseconds='2', httpStatusCode='500', exceptionMessage='', errorCode='', failureCause='Service', errorMessage='', referer='', commandName='', parameterSetName='', contentType='application/json; charset=utf-8', contentEncoding='', armServiceRequestId='', organizationId='', activityVector='IN', locale='en-US', additionalProperties='{"ParentActivityId":"00-098e0297f438c0b91e4e9ad3612a4c86-eb937c70405cb7d4-00"}', targetResourceProvider='', targetResourceType='', extensionVersion='1.81.39.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='4fe13f75-6bd1-4872-9142-8ce1c2387ae4'.
mikeholdorf commented 1 week ago

Everything is working for me and I can bring up the workspace and all works fine with the Designer. The other developers on the project are cloning the repo and when they try and bring up the Designer, it just states Error determining the Root. So the good old saying...works on my machine. We have not been able to figure out a resolution. It looks like the workspace file has some hardcoded paths using my username and it also appears that not all of the .vscode files were created properly. Works different on a Mac vs a Windows machine, so is a big concern for multiple developer projects right now.

skastberg commented 1 week ago

Agree with @mikeholdorf, to clarify on my test. On the machine where I created the Logic App it works fine in the machine where I have cloned the repo it does not.

Viktorh89 commented 1 week ago

Also experiencing this still, if i redo it manually l can reach designer, but reaching the local function seems to never work

skastberg commented 1 week ago

@mikeholdorf @Viktorh89 I've been able to get it working. The problem for me was that Logic Apps is dependent on settings that are in local.settings.json and that is included in different ignore files. When I changed so local.settings.json is included in the repo it works.

If you want to test I have created a simple repo to be able to test.

  1. Clone repo
  2. Open the workspace file def01.code-workspace
  3. Open a terminal for Function project and build
  4. Follow the instructions here for debug.
  5. Open designer

local.settings.json


  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "WORKFLOWS_SUBSCRIPTION_ID": "",
    "FUNCTIONS_WORKER_RUNTIME": "node",
    "APP_KIND": "workflowapp",
    "AzureWebJobsFeatureFlags": "EnableMultiLanguageWorker"
  }
}```
Viktorh89 commented 1 week ago

@skastberg yes, just did the same today - seems to be working, but I have to keep rebuilding the function because the lib folder keeps disapearing, maybe thats by design or im missing something, and not sure how i feel about needing to have the local.setting commited

skastberg commented 1 week ago

I'm logging an issue about local.setting, there are no secrets in mine but as we're used to have them in gitignore not ideal. Agree, a bit annoying building and think it is by design. You can see in the csproj file steps to do that. I assume it is the way to keep the description files under lib current.

mikeholdorf commented 1 week ago

I was able to pull down your repo and get to the designer with no problem. We will test this with our internal projects and make sure this will work. Thanks.