Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
361 stars 301 forks source link

Custom connector that uses Microsoft.Azure.Workflows.WebJobs.Extension 1.2.18.1 is incompatible with Microsoft.Azure.Functions.ExtensionBundle.Workflows 1.3.7 #722

Closed timjansenortec closed 1 year ago

timjansenortec commented 1 year ago

Describe the Bug

We are using Logic App Standard app with a custom plugin written in c#. So the project is nuget based.

Recently (?) a new extension bundle was released: 1.3.7 When opening the Designer in Visual Studio Code, this extension bundle is downloaded to C:\Users\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows\1.3.7

Our custom plugin has this package reference:

It seems that the extension bundle that the designer is downloading+using (1.3.7) is not compatible with the package reference in the custom connector (1.2.18.1). The designer func.exe crashes with an error like this: [2023-02-01T12:27:20.604Z] A host error has occurred during startup operation '9e339f81-a81c-40a7-ab75-6012f531f945'.[2023-02-01T12:27:20.605Z] MyCustomConnector: Method 'GetService' in type 'MyCustomConnector.Providers.MyCustomProvider' from assembly 'MyCustomConnector, Version=1.0.1.0, Culture=neutral, PublicKeyToken=c7c64cb54a897c02' does not have an implementation.Value cannot be null. (Parameter 'provider')

Workaround: we adjusted the host.json in the 'workflow-designtime' folder to not use the 1.3.7 extension bundle like so: { "version": "2.0", "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", "version": "[1.*, 1.3)" }, "extensions": { "workflow": { "settings": { "Runtime.WorkflowOperationDiscoveryHostMode": "true" } } } }

How should this work? Should there be a new version of Microsoft.Azure.Workflows.WebJobs.Extension?

Plan Type

Standard

Steps to Reproduce the Bug or Issue

  1. Create new nuget based logic app standard in visual studio
  2. Open the designer once, so the extension bundle is downloaded to C:\Users\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle.Workflows\1.3.7
  3. Add a custom connector based on Microsoft.Azure.Workflows.WebJobs.Extension version "1.2.18.1", copy the dll to the extension folder
  4. Try to open the designer again -> crash

Workflow JSON

No response

Screenshots or Videos

No response

Additional context

No response

AB#16990882

ccastrotrejo commented 1 year ago

Hi @timjansenortec, I have started to look at this issue, in the meantime there is a workaround in this thread https://github.com/Azure/logicapps/issues/716

rarayudu commented 1 year ago

Hi @timjansenortec, Can you share the "Microsoft.Azure.Workflows.WebJobs.Extension" package version that you are referring while building your custom connector?

timjansenortec commented 1 year ago

I seems this is the same issue as #716

As mentioned in my ticket description I am using this package reference in my custom connector csproj:

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 45 days with no activity.

ccastrotrejo commented 1 year ago

Please check #716