-
Notifications
You must be signed in to change notification settings - Fork 191
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
Exception when calling WebApps.ListAsync in Azure Function #191
Comments
@bjornsallarp could you post here server response? |
I prefer not posting the response here as it could disclose sensitive contractor information. I did set up a small sample that reproduce the problem here https://github.com/bjornsallarp/AzureFluentInFunctionException Please let me know if I can provide you with the response in a private way. I could also provide you with our tennantid, clientid and a secret if it doesn't reproduce with other subscriptions. |
@bjornsallarp thanks for the repro. could you send the payload directly to me? |
@bjornsallarp thank you for finding the root cause. The issue exists only in V1 of Azure Functions. The working solution for now would be to migrate your project to V2 of Azure Functions (i.e. .Net Core version which is currently in beta). |
The issue is not in the Newtonsoft.Json but in Microsoft.Rest.ClientRuntime library in Azure Functions V1 and affects all the Azure management libraries generated by Autorest. The thing is that Azure Functions V1 during runtime loads Microsoft.Rest.ClientRuntime v2.3.3.0 which contains a deserialization bug that was fixed in v2.3.4 according to github issue Azure/azure-sdk-for-net#2501 . |
i think this issue still persist. "The thing is that Azure Functions V1 during runtime loads Microsoft.Rest.ClientRuntime v2.3.3.0 which contains a deserialization bug that was fixed in v2.3.4 according to github issue Azure/azure-sdk-for-net#2501 ." Am using Microsoft.Rest.ClientRuntime version v2.3.10 but still same error as above. |
@shilsmarty you will need to migrate your project to .Net Core because the issue is not fixed yet. It does not matter what version of |
Fix in Azure Functions V1 was updated and deployed with the last 1.0 release (1.0.11702). |
I have a class library project in my solution that call the following method
var webApps = await azure.WebApps.ListAsync();
Target is .NET 4.7 and I use Newtonsoft 11.0.1
When I run the code from a Console App in the same solution, it works fine. When I run it from my Azure Function (.NET 4.7 target, Newtonsoft 11.0.1) project it throws an exception. This is the output in my Function window:
mscorlib: Exception while executing function: ExtractApps. Microsoft.Azure.Management.AppService.Fluent: Unable to deserialize the response. Newtonsoft.Json: Error reading JObject from JsonReader. Current JsonReader item is not an object: Null. Path 'properties.snapshotInfo', line 1, position 2727.
The text was updated successfully, but these errors were encountered: