[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 issueDescribe 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:
- Created 4 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top GitHub Comments
I see two issues:
@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