Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.33k stars 1.98k forks source link

[ANDROID] Cannot perform listBlobs action in Azure storage on Android #37035

Open jr1000000 opened 1 year ago

jr1000000 commented 1 year ago

The listBlobs method (and other methods that return a flat-mapped PageIterable) fails with java.lang.ExceptionInInitializerError at com.azure.core.util.serializer.JacksonAdapter.getXmlMapper when running on Android. The http request returns an xml document containing the blobs but XmlMapperFactory doesn't seem able to be resolved and the process hangs until timeout (or until manually terminated if no timeout is set).

LOGCAT output: logcat output.txt

To Reproduce In android (API 26) use the BlockBlobClient.listBlobs() method.

Code Snippet Add the code snippet that causes the issue.

Expected behavior Should return an iterable list of the blobs.

Setup (please complete the following information):

Additional context PR#37007 may resolve some of this issue by updating reflectionutils in azure core

JonathanGiles commented 1 year ago

@jr1000000 is going to look into using the latest azure-core code to determine if that resolves this issue.

jr1000000 commented 1 year ago

Hi @JonathanGiles I have tested importing the latest reflectionutils code and that hasn't resolved the issue. I am still getting the same error logs as before.

JonathanGiles commented 1 year ago

Thanks - leave it with us then.