-
Notifications
You must be signed in to change notification settings - Fork 121
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
R8/Proguard on RN 0.73 Java 17 AGP 8 causing Android Plaid link opens to crash #647
Comments
Hi @johnnyrwest, Thanks for reporting this. Could you try adding the following to your app's
Please let me know if this fixes the problem. |
Hi @melissaosullivan — thanks for looking into this! I have added these rules and attempted a fresh build, but unfortunately I am still crashing with the same error:
Clicking into the error in Logcat takes me to the
Not sure if that is helpful at this point but please let me know if I can surface any other details! |
@melissaosullivan not sure if I should close or if it's still worth looking at on the Plaid side, but I was able to try adding the proguard rules provided in this stack overflow ticket and open the Plaid link successfully without a crash 🙏
|
Hi @Juan2662, Looking at the description for 2.11.0 retrofit update, this will have no impact on the issue reported in this thread. This thread is about a proguard crash that occurs with proguard strict mode in proguard enabled builds. The crash occurs because code used by the SDK is stripped out. The proguard rules prevent the code from being stripped out and so that’s why adding rules this fixes the crash. The retrofit update seems to provide a more detailed parsing exception to non primary callers, but this more detailed parsing exception would still be an exception. So this upgrade would not remove the presence of an exception, and would not fix the bug described in this thread. |
The problem
We recently migrated our app from RN 0.72 -> 0.73 and with that noticed that Plaid linking on a production Android build now crashes.
Android-specific updates as a part of the upgrade:
Java 11 -> Java 17
AGP 7.4.x -> 8.0.x
Disabling r8/proguard seems to fix the issue, but ideally we don't have to turn that off.
Environment
Steps to Reproduce
.apk
with proguard enabledExpected Result
No crash
Screenshots
plaid.linking.android.webm
Logs
Code To Reproduce Issue
Our Plaid link flow follows the exact implementation per your current docs.
Worth noting that we build using Expo 50, but they do not enable proguard by default.
We have enabled r8 for Android builds, however, with the following rule:
-keep public class com.horcrux.svg.** {*;}
Please let me know if you need any additional info here — super odd how this worked with r8 before upgrading the AGP, so wanted to at least bring this issue to attention.
Confirming it does not appear to be the same issue as #598
If anything it is most similar to this issue
The text was updated successfully, but these errors were encountered: