question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Unable to deserialize the response / Error converting value "Standard_GZRS" to type 'Microsoft.Azure.Management.Storage.Fluent.Models.SkuName'. Path 'sku.name' /Error converting value "Standard_RAGZRS" to type 'Microsoft.Azure.Management.Storage.Fluent.Models.SkuName'. Path 'sku.name'

See original GitHub issue

Describe the bug
Failed to request storage accounts by resourceId or all, if they have been created with replication Read-access geo-zone-redundant storage (RA-GZRS) or Geo-zone-redundant storage (GZRS)

Exception or Stack Trace

Error: Unable to deserialize the response / Error converting value "Standard_GZRS" to type 'Microsoft.Azure.Management.Storage.Fluent.Models.SkuName'. Path 'sku.name'  
Error: Unable to deserialize the response / Error converting value "Standard_RAGZRS" to type 'Microsoft.Azure.Management.Storage.Fluent.Models.SkuName'. Path 'sku.name'
Stack:
at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)  
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)  
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)  
at Microsoft.Rest.Serialization.TransformationJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)  
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)  
at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings)  
at Microsoft.Azure.Management.Storage.Fluent.StorageAccountsOperations.ListWithHttpMessagesAsync(Dictionary`2 customHeaders, CancellationToken cancellationToken)  
at Microsoft.Azure.Management.Storage.Fluent.StorageAccountsOperationsExtensions.ListAsync(IStorageAccountsOperations operations, CancellationToken cancellationToken)  
at Microsoft.Azure.Management.Storage.Fluent.StorageAccountsImpl.ListInnerAsync(CancellationToken cancellationToken)  
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.PagedCollection`2.LoadPageWithWrapModelAsync(Func`2 listInnerAsync, Func`3 listInnerNext, Func`3 wrapModelAsync, Boolean loadAllPages, CancellationToken cancellationToken)  
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.PagedCollection`2.LoadPage(Func`2 listInnerAsync, Func`3 listInnerNext, Func`2 wrapModel, Boolean loadAllPages, CancellationToken cancellationToken)  
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.TopLevelModifiableResources`5.ListAsync(Boolean loadAllPages, CancellationToken cancellationToken)

To Reproduce
Storage accounts were created in region (US) East US with the specified replications and requested via any Fluent API

Code Snippet

var storageAccounts = await azure.StorageAccounts.ListAsync(true, _cancel);  
var storageAccount = await _storageAccountProvider.GetByStorageAccountResourceId(resourceId);

Expected behavior
I expect to get all storage accounts

Setup (please complete the following information):

  • OS: Windows 10
  • IDE : Visual Studio 2019
  • Version of the Library used: 1.28.0

Additional context
Microsoft.Azure.Management.Storage.Fluent.Models.SkuName doesn’t contain values for new SkuNames

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
qub1ncommented, Nov 15, 2019

I see two issues:

  1. new enum values are missing
  2. Storage Account SKU need to be ExpandableStringEnum instead of enum.
0reactions
nickzhumscommented, Jun 12, 2020

@mgroetan for future reference, we will be releasing a newer version of .NET SDK in late June. The annnoucement will be on https://github.com/Azure/azure-sdk-for-net/. The current .NET Fluent will be on a slow deprecation path, the newer version will contain a number of new features such as unified authentication, distributed tracing, better error-handling, and a couple other things. Feel free to try it and let us know if there’s any feedback

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get-AzStorageAccount : Unable to deserialize the response.
JsonSerializationException: Error converting value "Invalid" to type 'System.Nullable`1[Microsoft.Azure.Management.Storage.Models.AccessTier]'.
Read more >
Error converting value "'FREQ=MONTHLY;BYDAY=TU;BYS...
I tried to build a recurrence trigger on 2nd Tuesday every month, and got the error msg "Flow save failed with code 'InvalidTemplate'...
Read more >
Error from Parse JSON step when Updating Flow
The request content was invalid and could not be deserialized: 'Error converting value "ParseJson" to type 'System.Nullable`1[Microsoft.Azure.
Read more >
Error getting Storage Account from Azure (using ...
I am trying to get a storage account from an Azure Resource Group. I am getting the error below. Get Storage Account: An...
Read more >
Newtonsoft JSON Deserialize Issue [Error converting value ...
To fix this error either change the JSON to a JSON object (e.g. {\"name\":\"value\"}) or change the deserialized type to an array or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found