-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Text.Json Not working on Azure Functions v3 #1898
Comments
As a side note, bumping
=> System.Text.Encodings.Web.dll present
=> System.Text.Encodings.Web.dll not present |
Already went down that path last week. It's either something in Azure App Config or System.Text.Json or the Functions Run time itself, but I've got stay focused on shipping workable code so i can't keep digging into which part of the system is still thinking they need System.Text.Encodings.Web 5.0.0 during Function Start Up. You'll see I think in my referenced issue where I found a December issue where certain libraries were accidentally compiled with Run Time dependencies versus those from the imported packages. Life is good Life is Bad |
Hi @notaroobob , Thank you for your feedback! We will investigate this further and update you with the findings. |
Hi @notaroobob , Apologies for the delayed response, I discussed this scenario with the team and they confirmed that the 5.x.x version of system.text,json will no longer be supported with the version 3 of azure functions, and it is recommended to use the worker model instead. Let us know if any further queries |
Well. that's certainly a bummer considering Durable Functions aren't supported on the worker model. To be blunt, Microsoft has left developers in limbo until November 2021 (dot net 6, re-unifying the runtimes with developer expectations). Dependabot keeps telling me about all of these upgrades that I should be taking advantage of but I have to keep declining as most things aren't exactly FaaS or PaaS compatible without modification. Not mad enough to leave the stack, but I've been burned by the Extensions libraries, Entity Framework, and now System.Text.Json while tryin to stay lean and mean on the Azure platform. |
Hi @notaroobob , Apologies for the delay, I was internally checking with the team with all the possibilities here. If you want to use durable functions, then you will have to downgrade the system.text.json to 3.x.x. From 5.x.x, you will have to use the worker model which do not support the durable functions. |
Closing this issue as this is by-design, Please feel free to open a feature request here - https://feedback.azure.com/forums/355860-azure-functions |
System.Text.Json 5.0.2 brings with it an update to System.Text.Encodings.Web of 5.0.1.
The Dot net Runtimes for Azure Functions (linux in my case) is not allowing any executable to fire up. Specifically it's throwing an error that System.Text.Encodings.Web 5.0.0 is not found (which is true because it's now 5.0.1). Trying to force an update to 5.0.1 for Encodings.Web via nuget packages did not resolve the issue.
Reverting to System.Text.Json 5.0.1 (and System.Text.Encodings.Web to 5.0.0) fixes the issue for now, but I'll be needing to walk on egg shells for the next couple of months until Dot Net 6 consolidates and ships as default for the greater azure eco system.
Configuration
Which version of .NET is the code running on? - dot net core 3.1
What OS and version, and what distro if applicable? - Locally Mac OS 11.3.1. Deployed to Linux Consumption Function Tier
What is the architecture (x64, x86, ARM, ARM64)? x64
Do you know whether it is specific to that configuration? Unknown, assumption is no
Regression?
Resolved via downgrading to System.Text.Json 5.0.1
Call Stack: RuntimeAssembly.InternalLoadAssemblyName() at REDACTED RuntimeAssembly.cs:line 345 Assembly.Load() AssemblyLoadContext.LoadFromAssemblyName() FunctionAssemblyLoadContext.TryLoadHostEnvironmentAssembly() at D:\a\1\s\src\WebJobs.Script\Description\DotNet\FunctionAssemblyLoadContext.cs:line 392 FunctionAssemblyLoadContext.Load() AssemblyLoadContext.ResolveUsingLoad() AssemblyLoadContext.Resolve() JsonPropertyInfo.GetPolicies() JsonPropertyInfo<KeyVaultSecretReference>.Initialize() JsonClassInfo.CreateProperty() JsonClassInfo.CreatePropertyInfoForClassInfo() new JsonClassInfo() JsonSerializerOptions.GetOrAddClass() JsonSerializerOptions.GetOrAddClassForRootType() ReadStack.Initialize() JsonSerializer.ReadCore<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault.KeyVaultSecretReference>() JsonSerializer.Deserialize<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault.KeyVaultSecretReference>() JsonSerializer.Deserialize<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault.KeyVaultSecretReference>() AzureKeyVaultKeyValueAdapter.<ProcessKeyValue>d__3.MoveNext() AsyncMethodBuilderCore.Start<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault.AzureKeyVaultKeyValueAdapter.<ProcessKeyValue>d__3>() AsyncTaskMethodBuilder<IEnumerable<KeyValuePair<string, string>>>.Start<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault.AzureKeyVaultKeyValueAdapter.<ProcessKeyValue>d__3>() AzureKeyVaultKeyValueAdapter.ProcessKeyValue() AzureAppConfigurationProvider.<ProcessAdapters>d__26.MoveNext() AsyncMethodBuilderCore.Start<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationProvider.<ProcessAdapters>d__26>() AsyncTaskMethodBuilder<IEnumerable<KeyValuePair<string, string>>>.Start<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationProvider.<ProcessAdapters>d__26>() AzureAppConfigurationProvider.ProcessAdapters() AzureAppConfigurationProvider.<SetData>d__25.MoveNext() AsyncMethodBuilderCore.Start<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationProvider.<SetData>d__25>() AsyncTaskMethodBuilder.Start<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationProvider.<SetData>d__25>() AzureAppConfigurationProvider.SetData() AzureAppConfigurationProvider.<LoadAll>d__20.MoveNext() AsyncTaskMethodBuilder<VoidTaskResult>.AsyncStateMachineBox<AzureAppConfigurationProvider.<LoadAll>d__20>.ExecutionContextCallback() ExecutionContext.RunInternal() AsyncTaskMethodBuilder<VoidTaskResult>.AsyncStateMachineBox<AzureAppConfigurationProvider.<LoadAll>d__20>.MoveNext() AsyncTaskMethodBuilder<VoidTaskResult>.AsyncStateMachineBox<AzureAppConfigurationProvider.<LoadAll>d__20>.MoveNext() AwaitTaskContinuation.RunOrScheduleAction() Task.RunContinuations() Task.FinishContinuations() Task.FinishStageThree() Task.FinishStageTwo() Task.ExecuteWithThreadLocal() Task.ExecuteEntryUnsafe() Task.ExecuteFromThreadPool() ThreadPoolWorkQueue.Dispatch() _ThreadPoolWaitCallback.PerformWaitCallback() [Native to Managed Transition]
Referencing original logged issue:
dotnet/runtime#52845
The text was updated successfully, but these errors were encountered: