Describe the Bug
When running Azure Logic Apps Standard workflows locally using VS Code, all workflow
triggers fail with a MethodAccessException. The error occurs in
ApplicationInsightsRequestScope.SetTriggerProperties when it tries to call
Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty, which is an internal
method and not accessible.
This affects ALL workflows in the project - none can be triggered locally.
Error Message
System.MethodAccessException: Attempt by method
'Microsoft.Azure.Workflows.WebJobs.Extensions.Logging.ApplicationInsightsRequestScope
.SetTriggerProperties(System.String, Boolean, System.Collections.Generic.Dictionary2 <System.String,System.Object>)' to access method 'Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty <System.Collections.Generic.KeyValuePair2<System.String,System.Object>>
(System.Collections.Generic.IEnumerable1<System.Collections.Generic.KeyValuePair2
<System.String,System.Object>>)' failed.
Workflow Status
All workflows report: status='Failed', statusCode='WorkflowRunTimedOut'
immediately (within ~700ms), followed by the MethodAccessException.
Environment
- OS: Windows 11
- VS Code: 1.114.0
- Azure Logic Apps Standard Extension: 5.230.15
- Azure Functions Core Tools: 4.9.0
- Extension Bundle: Microsoft.Azure.Functions.ExtensionBundle.Workflows 1.138.54
- Microsoft.IdentityModel.Tokens.dll version in bundle: 6.35.0.41201
Additional Context
- Upgrading to bundle 1.160.21 resolves the MethodAccessException but introduces a
different bug: "System.PlatformNotSupportedException: Performance Counters are not
supported on this platform" which also blocks all workflow execution.
- Replacing Microsoft.IdentityModel.Tokens.dll with version 6.34.0 does not resolve
the issue, as the call originates from compiled code in the workflow extension.
- Disabling Application Insights via local.settings.json
(APPINSIGHTS_INSTRUMENTATIONKEY="") does not prevent the error.
- The issue appears to be a version mismatch between the compiled workflow extension
DLL and the shipped Microsoft.IdentityModel.Tokens.dll in the bundle.
Steps to Reproduce
- Create or open a Logic Apps Standard project in VS Code
- Ensure extension bundle version resolves to 1.138.54
- Start Azurite and run func host start
- Trigger any workflow via HTTP
- Observe MethodAccessException in logs and InternalServerError/WorkflowRunTimedOut
Expected Behavior
Workflows should execute successfully when triggered locally.
Plan Type
Standard
Steps to Reproduce the Bug or Issue
- Open a Logic Apps Standard project in VS Code (extension v5.230.15)
- Ensure host.json has: "version": "[1.*, 2.0.0)" (resolves to bundle 1.138.54)
- Start Azurite (azurite --silent)
- Run func host start (Core Tools 4.9.0)
- Trigger any workflow via HTTP request
- Observe MethodAccessException in terminal logs
- Workflow fails with WorkflowRunTimedOut (~700ms) and returns InternalServerError
Workflow JSON
Screenshots or Videos
No response
Additional context
Tested two bundle versions with identical results:
Bundle 1.138.54:
- MethodAccessException in ApplicationInsightsRequestScope.SetTriggerProperties
calling internal method Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty
- Microsoft.IdentityModel.Tokens.dll version in bundle: 6.35.0.41201
- Replacing DLL with v6.34.0 does not help (call is from compiled extension code)
- Disabling AppInsights via local.settings.json does not prevent the error
Bundle 1.160.21:
- Resolves MethodAccessException but introduces:
"System.PlatformNotSupportedException: Performance Counters are not supported on this platform"
- This also blocks all workflow execution locally
Environment:
- Windows 11, 12 cores
- VS Code 1.114.0
- Azure Logic Apps Standard Extension: 5.230.15
- Azure Functions Core Tools: 4.9.0 (also tested with 4.5.0 - same issue)
- Node runtime, Azurite for local storage
Describe the Bug
When running Azure Logic Apps Standard workflows locally using VS Code, all workflow
triggers fail with a MethodAccessException. The error occurs in
ApplicationInsightsRequestScope.SetTriggerProperties when it tries to call
Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty, which is an internal
method and not accessible.
This affects ALL workflows in the project - none can be triggered locally.
Error Message
System.MethodAccessException: Attempt by method
'Microsoft.Azure.Workflows.WebJobs.Extensions.Logging.ApplicationInsightsRequestScope
.SetTriggerProperties(System.String, Boolean, System.Collections.Generic.Dictionary
2 <System.String,System.Object>)' to access method 'Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty <System.Collections.Generic.KeyValuePair2<System.String,System.Object>>(System.Collections.Generic.IEnumerable
1<System.Collections.Generic.KeyValuePair2<System.String,System.Object>>)' failed.
Workflow Status
All workflows report: status='Failed', statusCode='WorkflowRunTimedOut'
immediately (within ~700ms), followed by the MethodAccessException.
Environment
Additional Context
different bug: "System.PlatformNotSupportedException: Performance Counters are not
supported on this platform" which also blocks all workflow execution.
the issue, as the call originates from compiled code in the workflow extension.
(APPINSIGHTS_INSTRUMENTATIONKEY="") does not prevent the error.
DLL and the shipped Microsoft.IdentityModel.Tokens.dll in the bundle.
Steps to Reproduce
Expected Behavior
Workflows should execute successfully when triggered locally.
Plan Type
Standard
Steps to Reproduce the Bug or Issue
Workflow JSON
Screenshots or Videos
No response
Additional context
Tested two bundle versions with identical results:
Bundle 1.138.54:
calling internal method Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty
Bundle 1.160.21:
"System.PlatformNotSupportedException: Performance Counters are not supported on this platform"
Environment: