-
Notifications
You must be signed in to change notification settings - Fork 328
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
BUG: com.azure.core.exception.HttpResponseException: Deserialization Failed #1612
Comments
I dont know but it might be related to the following issue. |
It looks the error happens on the client side. The related issue from you looks also fixed by a client side change. |
It is quite weird because If I run my code in a real Azure system I don't get any error so I don't see why the error should happen on the client side. I am not quite sure how similiar is the behaviour of this container to the behaviour of the real system. |
With only client exception, we don't have enough information to investigate this.
|
Apparently, the root cause is related to the following issue: Edit: Our team lead has clarified in more details when the error happens in the comment below @blueww . Hopefully you will |
@heurisctics123 How do you get the root cause is Azurite still not support Blob Tag? Ask this since we need this information to prioritize the blob tag work, and design blob tag implemetaion in Azurite. |
The issue happens when we call the "getTags" method on the client (java sdk; class: BlobAsyncClientBase; method: getTags). The relevant part is that the comp=tags part gets added. Azure Storage Cloud returns XML in the http response body (which represents the tags), which is what the client sdk expects and tries to parse. Azurite seems to ignore comp=tags parameter and returns the binary. Client sdk tries to parse that and fails as it is neither |
@nwei-mc From your description, I get this is caused by GetTag API still not support by Azurite, so Azurite parse it to another API and ignore "comp=tags". |
Hi Team, On investigating what I could figure out is : 11:02:32.007 [reactor-http-kqueue-1] WARN com.azure.messaging.eventhubs.PartitionBasedLoadBalancer - Load balancing for event processor failed. azure-storage-blob : 12.20.1 version |
Would you please give the Azurite debug log and Azurite version for this issue? |
Hello, I am using Azurite latest version. I am getting the same error when calling getTags() method of BlobClient class. Is there any solution for it? |
@DivyansMahansaria Before the feature is supported by Azurite, would you please don't call Tag related API like GetTags() to Azurite, or there might be unexpected result. |
|
Facing same issue while using azure-core 1.35.0. it is create issue while i try to create queue using JAVA-SDK. |
Facing same issue using the Java libraries of azure-core 1.36.0, azure-messaging-eventhubs-checkpointstore-blob 1.16.3, azure-core-amqp 2.8.2, and azure-messaging-event-hubs 5.15.2 . We are using Event hubs with checkpointing. The load-balancing code is retrieving my checkpoint ownership ( which is in XML) but the code is treating it as JSON so it is getting a JsonProcessingException hence "Deserialization Failed". We do see the following error : [co.az.co.ut.se.SerializerEncoding] (reactor-http-epoll-1) 'Content-Type' not found. Returning default encoding: JSON Perhaps content type from the http response has no Content-type header due to a code change or the default changed in the SerializerEncoding class? |
In the blob rest API doc, it says
I have also checked with the team owns Storage API, and they confirmed contentMD5 is optional. So this is a bug in the libraries you are using. They expect an optional property "contentMD5" always be returned from server, which is not correct. |
Thanks for the reply but I think you answered a question from another bug report here.; I have no idea what you are talking about. The issue here was that the checkpoint ownership information was returned to the library as XML but the library was interpreting it as JSON so it got a deserialization error. While debugging I saw the XML data and confirmed this. |
@bronzegod3 From your issue, it looks 'Content-Type' is missing from responds. Would you please share:
BTW, this looks a different issue than the original one (the orignal one is for blob tag not support.) |
You're right, it does seem my issue is different and I apologize for reporting my issue here. |
*Which service(blob, file, queue, table) does this issue concern?
Blob
*Which version of the Azurite was used?
Docker / 3.18.0
*Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
DockerHub: mcr.microsoft.com
*What's the Node.js version?
The one in the provided docker container
*What problem was encountered?
Edit: There is no problem with my code because if I test it towards a real Azure system it works.
I have been able to to run a local container of Azure Blob storage. Most of the time it works(when I upload images) but it fails when I provide other types of data. I get exactly the following error:
Blob operation error on blob: 'reports/08191407-a4d4-4c86-9f3c-45a02b8c93ec' com.azure.core.exception.HttpResponseException: Deserialization Failed. at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.decodeByteArray(HttpResponseBodyDecoder.java:92) at com.azure.core.implementation.serializer.HttpResponseDecoder$HttpDecodedResponse.getDecodedBody(HttpResponseDecoder.java:93) at reactor.core.publisher.Mono.lambda$mapNotNull$28(Mono.java:3429) at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:176) at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2398) at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.request(FluxHandleFuseable.java:257) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171) at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2194) at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2068) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96) at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onSubscribe(FluxHandleFuseable.java:161) at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55) at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) at reactor.core.publisher.FluxDoOnEach$DoOnEachSubscriber.onNext(FluxDoOnEach.java:173) at reactor.core.publisher.FluxDoOnEach$DoOnEachFuseableSubscriber.onNext(FluxDoOnEach.java:281) at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137) at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79) at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151) at reactor.core.publisher.FluxDelaySubscription$DelaySubscriptionMainSubscriber.onNext(FluxDelaySubscription.java:189) at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99) at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99) at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.onNext(FluxTimeout.java:180) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onNext(MonoPeekTerminal.java:180) at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.complete(MonoIgnoreThen.java:292) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onNext(MonoIgnoreThen.java:187) at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151) at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99) at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onNext(FluxRetryWhen.java:174) at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79) at reactor.core.publisher.Operators$MonoInnerProducerBase.complete(Operators.java:2664) at reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:180) at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onComplete(MonoFlatMapMany.java:260) at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onComplete(FluxDoFinally.java:128) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152) at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1817) at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160) at reactor.core.publisher.FluxHandle$HandleSubscriber.onComplete(FluxHandle.java:220) at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onComplete(FluxMap.java:275) at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:400) at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:419) at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:473) at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:703) at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:93) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'PK o': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') ?u???\u0019+??a\u007Fi]??\u0012?d?F?_???6P?\u0002v??i?q?a?\u001C\u0013\u0017\u0006x\u0015???\u007F??\u00010?\u001E\u0000?\u001BJ\u0006??,?t??\u0019l?\u0013???/?~??Dj8I? ?\u007F?I?PJ?T?G?mkHr+???R&v\u001E?^Hk?\q?b;W????\u0015'-?s???)~???>?o?\u0014\u007FO)n? h?.?\u0012???'??\u001BC\u0003? I#\u0002?&i\u0007?#\u0013?\u0000\u001E???nxg?/??H???>??f?Y!\u000Er"[truncated 920346 bytes]; line: 1, column: 13] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2391) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:745) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3635) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2734) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:902) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:794) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4761) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4667) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3723) at com.azure.core.implementation.jackson.ObjectMapperShim.readValue(ObjectMapperShim.java:224) at com.azure.core.util.serializer.JacksonAdapter.lambda$deserialize$8(JacksonAdapter.java:225) at com.azure.core.util.serializer.JacksonAdapter.useAccessHelper(JacksonAdapter.java:271) at com.azure.core.util.serializer.JacksonAdapter.deserialize(JacksonAdapter.java:223) at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserializeBody(HttpResponseBodyDecoder.java:145) at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.decodeByteArray(HttpResponseBodyDecoder.java:86) ... 81 common frames omitted
The text was updated successfully, but these errors were encountered: