-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Hi,
i have an issue with our app, and it looks like the update of the gson library from 2.8.7 to 2.8.8 is the culprit.
I suspected proguard and updated the rules from https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg which did not resolve the issues. However, the rules are older than the 2.8.8 release, so maybe the have to be updated?
Looking at the stacktraces it seems to be related to enum:
Caused by: java.lang.ClassCastException: com.microsoft.identity.client.configuration.AccountMode[] cannot be cast to java.lang.Enum
at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.(SourceFile:7)
Checking the release notes i see that 2.8.8 changed this class:
https://github.com/google/gson/releases/tag/gson-parent-2.8.8
EnumTypeAdapter now works better when ProGuard has obfuscated enum fields (#1495).
Now i am unsure what exactly causes the issue, as it only occurs when the apk is wrapped with mobile iron. but as downgrading to json 2.8.7 fixed the issue i decided to write this post anyway.