-
Notifications
You must be signed in to change notification settings - Fork 658
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
The 3ds2 dependency breaks Firebase Performance and Robolectric #1141
Comments
I was wondering if we could downgrade the bouncy castle to something like 1.52, given it's the version most commonly used by other dependencies? |
I was also facing an issue with Firebase performance plugin, its reported here https://issuetracker.google.com/issues/135171107#comment14 the problem is Firebase extracts the jar files and the obfuscated filenames are designed to be used on a case-sensitive file system, like A.class and a.class are considered same in the default case insensitive file systems of Windows and Mac so either one will overwrite the other, the only viable solution is to work on the project on a case sensitive file system, but be warned its asinine to do so because a.java and a.JAVA will be considered two separate files, also since Google said they'll fix firebase and work on it and has no forseeable future when the fix will come, can Stripe handle it on their side? |
@romainpiel out of curiosity, does upgrading to the latest version of Robolectric (4.3) help with the performance issues? |
@msaffitz-stripe I tried upgrading Robolectric to version 4.3 and faced that other issue: robolectric/robolectric#4621 (comment) Trying with 4.2.1 now... |
I just noticed the same issue with Robolectric 4.2.1 on our CI. |
@romainpiel I can downgrade the version of BouncyCastle we're using, but is that the cause of the Robolectric performance issues? Are the performance issues resolved when you force 1.5.2? Are you able to add any log statements to your tests to see where the bottleneck is? Also, does upgrading to stripe-android 9.3.6 improve anything? Also, noticed there's a newer version of the Firebase performance plugin, 1.2.1. Maybe worth trying? https://firebase.google.com/docs/perf-mon/get-started-android |
Yes the firebase issue gets fixed when I force bouncy castle to version 1.56 and the robolectric issue gets fixed when I force bouncy castle to version 1.52.
We noticed this issue on some of our machines (like on the CI). It took us quite a long time to reach the conclusion that it was related to bouncy castle and didn't go further in our investigation.
I also tried this and stumbled upon that other issue: https://stackoverflow.com/questions/45172123/errorexecution-failed-for-task-apptransformclasseswithfirebaseperformanceplu Sorry I realise this is quite a hard issue for you to fix. I'm discussing with the three parties (Stripe, Firebase, Robolectric) to see if I can find a way to unlock this situation but I also realise it's no one's real responsibility. |
The Firebase team has asked me to build a sample to demonstrate the issue. So I forked the Firebase sample and added a dependency to Stripe 9.3.5: https://github.com/RomainPiel/quickstart-android/tree/stripe-issue To reproduce the Firebase issue, run |
@mshafrir-stripe I updated to 9.3.6 and I am now facing the issue with bouncy castle as mentioned by the OP AGPBI: {"kind":"error","text":"Unsupported source file type","sources":[{"file":"/app/build/intermediates/transforms/FirebasePerformancePlugin/staging/186/module-info.class"}],"tool":"D8"} 186 directory is part of org.bouncycastle |
@droidluv what versions of Gradle and Android Gradle Plugin are you using? |
@mshafrir-stripe Gradel 3.4.2 and Android Studio is 3.4.2, also Firebase plugin is 1.2.1 |
@droidluv can you try upgrading Gradle to at least 5.4.1
and Android Gradle Plugin to at least 3.4.1
|
@mshafrir-stripe Oh I'm sorry I was not clear enough my gradle plugin is 3.4.2 and gradle version is 5.1.1 |
@droidluv can you try using Gradle 5.4.1? |
@mshafrir-stripe also just updated and started using gradle 5.4.1 but facing same failure AGPBI: {"kind":"error","text":"Unsupported source file type","sources":[{"file":"/app/build/intermediates/transforms/FirebasePerformancePlugin/staging/186/module-info.class"}],"tool":"D8"} FAILURE: Build failed with an exception.
|
@droidluv can you send me your build.gradle and Proguard rules. I'd like to reproduce the issue. |
@mshafrir-stripe How should I send it, can you give me your email address? |
@mshafrir-stripe You can also use the sample I posted yesterday to reproduce the issue: https://github.com/RomainPiel/quickstart-android/tree/stripe-issue
I think we're facing the same issue with @droidluv |
Also for reference, the firebase team got back to me with this answer:
|
@mshafrir-stripe sorry I ran off it was getting late for me and the error I am facing is just like @romainpiel's sample |
I followed these steps but got the following:
|
@mshafrir-stripe Ah right, You need to create a Firebase project following these steps first: https://firebase.google.com/docs/android/setup |
@romainpiel what Application Id should I be using when registering the app in Firebase? |
|
@romainpiel this is what I'm seeing now after adding `implementation 'com.stripe:stripe-android:9.3.6' to the perf module's dependencies
|
@mshafrir-stripe you can switch to my branch |
@romainpiel I came across the following two issues which seem to indicate that they'll be fixed in the next Android Studio release? https://issuetracker.google.com/issues/131114388 |
Interesting 👍 |
@romainpiel FYI there are new versions of some dependencies, including the Firebase perf plugin. I wonder if it makes any difference.
|
Updated and it still fails with the same error:
I've pushed the update in this commit: romainpiel/quickstart-android@70ce8e7 |
@mshafrir-stripe I updated Firebase perf-plugin to 1.3.0 and walla all my problems disappeared into thin air, I have Firebase Performance Monitoring working and Stripe right along with it, thanks for all your help!!! |
@droidluv that's great to hear! Can you share your |
I've just tried using version 1.3.0 and I'm getting the same issue as with version 1.2.1 of the plugin (unrelated to the one described in this github issue): https://stackoverflow.com/questions/45172123/errorexecution-failed-for-task-apptransformclasseswithfirebaseperformanceplu |
@romainpiel can you DM me in ASG? |
@romainpiel I just released 10.0.1 which fixes some of the incompatibilities with the Firebase plugin. Can you let me know if it resolves your issues? |
Hmm - I'm using Stripe 10.0.1, Firebase Performance plugin 1.3.0, Firebase Performance library 18.0.1, and Gradle 5.5.1, and Android Gradle plugin 3.4.2. And I still get a similar error when building my optimized builds with R8:
Any ideas for how to debug further? It seems like there's some bad configuration somewhere, but it's a bit mysterious to me where this would come from. |
@tmtrademarked can you try upgrading to the latest SDK version |
I've tried updating to the 10.0.3 branch, but unfortunately, no luck so far. We're still seeing the same error. It sure appears that this is the same problem with the We have a LOT of dependencies in our APK. I can provide a partial dump from |
I've confirmed that adding the following to our top-level build.gradle does fix the problem by forcing a bouncycastle downgrade. It's ugly, but that may be our best path forward until someone finds a real fix for the root issue.
|
Yes I am using a similar fix:
The tricky bit with this issue is that it's not really a bug on Stripe nor a bug on Firebase (or bouncy castle). But rather the three parts not playing well together. |
@romainpiel @tmtrademarked if you upgrade to stripe-android 10.4.0, you may be able to remove the |
The resolution strategy is on bouncy castle, not asm 🤔 UPDATE: ah right the ASM issue is another one referenced previously my bad 😅. I still see the ASM issue when I update Stripe to the latest version and Firebase to version 1.3.1 (https://stackoverflow.com/questions/45172123/errorexecution-failed-for-task-apptransformclasseswithfirebaseperformanceplu) |
@romainpiel thanks for checking |
To confirm, I also still see an R8 issue using Firebase Performance Plugin 1.3.1, Firebase Performance 19.0.0, and Stripe 10.4.1. Looks like it's still having trouble with bouncy-castle unless I forcibly downgrade that one.
|
for someone out there who's still experiencing the error, this might help |
Summary
Upgrading Stripe to version 9.3.5 (or any version after 9.1.1) breaks our app. The 3ds2 dependency added transitively the dependency to
org.bouncycastle:bcprov-jdk15on:1.61
. This forces a few other dependency to use that version and breaks the app in different ways:Android version
minSdk 21
SDK version
Version 9.1.1 to 9.3.5
Other information
I managed to work around both issues by forcing the bouncy castle dependency to 1.52.
Forcing the version to 1.52 shows an issue with Lint:
But I imagine we can safely ignore it as I don't assume we do LDAP with Stripe.
The text was updated successfully, but these errors were encountered: