Include proguard consumer directives for R8 compatibility
Nobody has claimed this yet.
- #148 by @solevic — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- build-system, mobile
Research direction
Start by reviewing the Gson ProGuard example linked in the issue and the Android library's packaging configuration. Add a consumer ProGuard configuration containing the referenced Gson rules, then verify that an R8-minified build no longer produces the reported “Missing type parameter” crash during JWT initialization.
Written by the indexing model from the issue text.
Description
Checklist
- I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
Developers using R8 have encountered minification issues with the use of GSON in JWTDecode.Android - https://github.com/auth0/JWTDecode.Android/issues/49
Describe the ideal solution
JWTDecode.Android can include proguard directives in a consumer configuration file, which will advertise the issue and solve it for most consumers of the library.
In a new consumer proguard config, include the GSON proguard rules for R8 compiled projects.
Alternatives and current workarounds
Current workaround is for the consuming project to include the proguard directives for R8 compilers themselves, but that is only likely to happen after they discover the issue, research and locate the solution.
Additional context
Users will discover the issue via a crash report in their minified release builds similar to this:
--------- beginning of crash2023-08-07 13:47:36.054 16347-17602/? E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: foo_bar, PID: 16347
java.lang.RuntimeException: Missing type parameter.
at com.google.gson.reflect.TypeToken.(SourceFile:10)
at u6.c.(Unknown Source:0)
at com.auth0.android.jwt.JWT.(SourceFile:6)
at v6.i.c(SourceFile:3)
at v6.i$b.onSuccess(SourceFile:2)
at v6.o$a.onSuccess(SourceFile:2)
at w6.g.onResponse(SourceFile:7)
at com.squareup.okhttp.Call$b.execute(SourceFile:6)
at com.squareup.okhttp.internal.NamedRunnable.run(SourceFile:3)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
- Dominant language
- Java
- Stars
- 455
- Forks
- 81
- Avg merge
- 5h 23m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/JWTDecode.Android
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
auth0/JWTDecode.Android#100 · 9 comments · 1 reaction ·
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
auth0/JWTDecode.Android#82 · 10 reactions ·
All issues in auth0/JWTDecode.Android
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
it-at-m/Wahllokalsystem#3846 ·
Maintainers usually reply within 2 days
-
Area/Connector module/solace Priority/Low Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
ballerina-platform/ballerina-library#9849 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Vakore/ZappierGames#327 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day