You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.microsoft.azure.CloudException: polling response does not contain a valid body: {
"name":"1431219a-acad-4d70-9a17-f8b7a5a143cb","status":"InProgress","error":{
"code":"None","message":null,"target":"e1a19fd1-8110-470a-a82f-9f789c2b2917"
}
}
at com.microsoft.azure.AzureAsyncOperation.fromResponse(AzureAsyncOperation.java:148)
You can reproduce the issue with the following media services code:
The "error" property is a sub-tree and needs a codec to be read, as seen in method "deserialize" in CloudErrorDeserialization.java (line 3), which tries to read the tree. But the passed in argument p does not have a codec and it's where the exception is thrown.
```
1 @OverRide
2 public CloudError deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
3 JsonNode errorNode = p.readValueAsTree();
4 if (errorNode == null) {
5 return null;
6 }
7 if (errorNode.get("error") != null) {
8 errorNode = errorNode.get("error");
9 }
10
11 JsonParser parser = new JsonFactory().createParser(errorNode.toString());
12 parser.setCodec(mapper);
13 return parser.readValueAs(CloudError.class);
14 }
I think the fix is simple, we have a reference (line 12 sets the codec) to the codec and we can use that to read the tree directly. Just replace line 3 with:
JsonNode errorNode = mapper.readTree(p); // Or something similar to this line.
It appears that some long running Async Operations cannot be serialized by the AzureJacksonAdapter.
When attempting to create a live event using the Java SDK generated for Azure Media Services (see https://github.com/Azure/azure-sdk-for-java/tree/master/mediaservices/resource-manager/v2018_07_01 beta 3 version) the following error is encountered:
com.microsoft.azure.CloudException: polling response does not contain a valid body: {
"name":"1431219a-acad-4d70-9a17-f8b7a5a143cb","status":"InProgress","error":{
"code":"None","message":null,"target":"e1a19fd1-8110-470a-a82f-9f789c2b2917"
}
}
at com.microsoft.azure.AzureAsyncOperation.fromResponse(AzureAsyncOperation.java:148)
You can reproduce the issue with the following media services code:
The text was updated successfully, but these errors were encountered: