AzureAD/azure-activedirectory-library-for-android

IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 150 path

Sammekl opened this issue · 1 comments

Expected behavior
When a token is expired it should refreshed using acquireTokenSilent. The library should handle the authentication and return a result containing the new token(s).

Actual behavior
When a token is refreshed using acquireTokenSilent an exception is thrown and the app crashes due to:
Fatal Exception: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 150 path $.b more info here:
https://gist.github.com/Sammekl/cffd75617077293c8278d2ca298b96e6

Scale of issue
About 30% of our users seem to have this issue where it crashes on each token refresh.
The issue appeared at 13PM september 30 2019 for the first time. It seems like the underlying API has been changed but it is not backwards compatible.

Edit: issue seems to appear when using release builds without proguard rules for AAD. This wasn't an issue before, but I will use the proguard rules for now..

Thanks for providing the follow, yes ProGuard instructions are available here. There are no plans to change this guidance currently.

https://github.com/AzureAD/azure-activedirectory-library-for-android#proguard