logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

VSCODE_Parameterization_Nuget Based Project_Showing error message while running the flow.

Open v-prakumar opened this issue 3 years ago • 21 comments

Describe the Bug with repro steps

  1. Use an existing local logic app with a workflow that has multiple different connections. ManagedApi, Function, and ServiceProviderOperations sections in connections.json should all have at least 1 connection.

  2. Make sure that the workflow runs successfully before making any changes. Test this out by getting 1 successful run.

  3. Create a new file in the root of the project (same level as connections.json) named "parameters.json" as an empty object ("{}").

  4. Parameterize workflow

4.1. Parameterize some action inputs. For example, if you have a SQL action, you can parameterize the SQL query by using "@parameters('SqlQueryParam')" in the input. For this input you would have to create a matching entry in "parameters.json" that would look like this:

"SqlQueryParam": {

"type": "string",

"value": "SELECT * FROM …."

}

Note that you can try this with other parameter types as well like: Array, Bool, Float, Int, Object, String.

  1. Parameterize connections.json

5.1. Parameterize some values in connections.json. You can parameterize things like "connectionRuntimeUrl" as a string, or "authentication" as an object. Please try multiple different things here and make sure to follow the previous step to add a matching parameter value in parameters.json

6.The flow should be run successfully as expected.

Workflow JSON

No response

Screenshots or Videos

image

Browser

VS Code

Additional context

Expected:The flow should be run successfully without any error.

Actual:Showing error message related to workflow while running the flow.

Workflow Error: operationName='WorkflowDefinitionProvider.GetFunctionMetadataAsync', message='Workflow processing failed, the response exception is 'Parsing 'functionConnections' value in connections.json file failed. Details: The workflow parameter 'functionAuth' is not found..'', exception='Microsoft.Azure.Workflows.Common.ErrorResponses.ErrorResponseMessageException: Parsing 'functionConnections' value in connections.json file failed. Details: The workflow parameter 'functionAuth' is not found.. [2021-06-04T15:39:33.849Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Initialization.WorkflowFunctionDefinitionProvider.GetResolvedFunctionConnections(InsensitiveDictionary1 functionConnections, InsensitiveDictionary1 parameters) [2021-06-04T15:39:33.852Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Initialization.WorkflowFunctionDefinitionProvider.LoadEdgeConnectionDetails(InsensitiveDictionary`1 parameters) [2021-06-04T15:39:33.854Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Initialization.WorkflowFunctionDefinitionProvider.ProcessWorkflowFiles() [2021-06-04T15:39:33.857Z] at Microsoft.Azure.Workflows.WebJobs.Extensions.Initialization.WorkflowFunctionDefinitionProvider.GetFunctionMetadataAsync()', extensionVersion='1.0.0.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'. [2021-06-04T15:39:34.040Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

AB#24192822

v-prakumar avatar Apr 10 '23 13:04 v-prakumar

This is known issue in the old designer of VS Code NuGet based.

v-prakumar avatar Apr 10 '23 13:04 v-prakumar

Azure DevOps link to related issue

ccastrotrejo avatar Apr 10 '23 21:04 ccastrotrejo

@ccastrotrejo Repro in VSIX 2.24.3. image

v-prakumar avatar Jun 06 '23 12:06 v-prakumar

@ccastrotrejo Issue is repro in vsix : 2.45.3

v-prakumar avatar Jul 18 '23 10:07 v-prakumar

@AbodeSaafan Please find the attached Workflow.json

{ "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "Call_an_Azure_function": { "type": "Function", "inputs": { "method": "POST", "body": { "name": "test" }, "function": { "connectionName": "azureFunctionOperation" } }, "runAfter": {} }, "Create_file": { "type": "ApiConnection", "inputs": { "host": { "connection": { "referenceName": "dropbox" } }, "method": "post", "body": "@body('Call_an_Azure_function')", "path": "/datasets/default/files", "queries": { "folderPath": "@{triggerBody()}", "name": "@{body('Call_an_Azure_function')}", "queryParametersSingleEncoded": true } }, "runAfter": { "Call_an_Azure_function": [ "SUCCEEDED" ] } }, "Send_message": { "type": "ServiceProvider", "inputs": { "parameters": { "entityName": "abc", "message": { "contentType": "{"name":"test"}" } }, "serviceProviderConfiguration": { "connectionName": "serviceBus", "operationId": "sendMessage", "serviceProviderId": "/serviceProviders/serviceBus" } }, "runAfter": { "Create_file": [ "SUCCEEDED" ] } }, "Compose": { "type": "Compose", "inputs": "@parameters('responseString')", "runAfter": { "Send_message": [ "SUCCEEDED" ] } } }, "contentVersion": "1.0.0.0", "outputs": {}, "triggers": { "When_a_HTTP_request_is_received": { "type": "Request", "kind": "Http" } }, "parameters": {} }, "kind": "Stateful" }

vgouth avatar Aug 22 '23 08:08 vgouth

Issue repro in the latest VS code request

1.VS Code extension: 2.86.0

image

ramya894 avatar Nov 30 '23 16:11 ramya894

Issue repro in the latest VS code request 1.VS Code extension: 2.99.0

image

ramya894 avatar Jan 04 '24 16:01 ramya894

issue repro in the latest VS code request 1.Bundle version:155.1

image

ramya894 avatar Jan 10 '24 16:01 ramya894

issue repro in the latest VS code request 1.Bundle version:1.58.3 image

ramya894 avatar Jan 29 '24 17:01 ramya894

Issue repro in the latest VS code request. 1.VS Code extension: 2.108.0 image

ramya894 avatar Feb 06 '24 16:02 ramya894

Issue repro in the latest VS code request. 1.VS Code extension: 2.113.1

image

ramya894 avatar Feb 14 '24 17:02 ramya894

issue repro in the latest vscode version:

image

ramya894 avatar Feb 29 '24 17:02 ramya894

Issue repro in the latest vscode version: 2.125.0

image

ramya894 avatar Mar 12 '24 17:03 ramya894

Issue repro in the latest vscode version 3.0.0

image

ramya894 avatar Mar 26 '24 16:03 ramya894

Issue repro in the latest VSCode version: 1.70.23

image

ramya894 avatar Apr 30 '24 16:04 ramya894

Issue repro in the latest VScode version: 4.13.10

image

ramya894 avatar May 23 '24 18:05 ramya894

Issue repro in the latest VScode version: 1.70.68

image

ramya894 avatar Jun 11 '24 12:06 ramya894

This is a test case issue, parameters.json was not present in the csproj To fix, csproj should also include this snippet

PreserveNewest

With that, parameters will be loaded for the project to use and no errors should come up. Resolving bug.

AbodeSaafan avatar Jun 11 '24 16:06 AbodeSaafan