-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Protobuf related build issue with Tink + Firebase (Android) #301
Comments
In between 1.3.0-rc1 and 1.3.0-rc3, we migrated from protobuf-lite to protobuf-javalite. From the protobuf side, this is a major and incompatible upgrade, as stated in the protobuf-javalite documentation:
For reference, it also contains a link to the documentation of protobuf-lite, referring to it as "the older version of Java Lite (v3.0.0)". Can you share some more context around your dependencies? Are you directly depending on protobuf-lite 3.0.1 (the old version) or is it an indirect dependency? |
I am not depending on it directly. It seems all dependencies come from Firebase packages (cloud_firestore, firebase_remote_config). Here are some snippets from the dependencies in my app:
|
Thanks for the additional detail. I'm looking into how to best accommodate this situation. |
FYI, we ended up reaching out to the Firebase team and they are working on upgrading their dependency. Please see this issue to track their progress. In the meantime, we're going to move forward with finalizing the 1.3.0 release with the protobuf-javalite dependency as is. Looking ahead, we're investigating options for shading the dependency to prevent such conflicts in the future. However, we need to figure out an approach with minimal compatibility issues and verify that it won't bloat the Android release artifacts too much. |
OK. I will stick to 1.3.0-rc1 until they fix it. I have not noticed any issues at least so far (my beta app is already in Google Play+AppStore). Thanks! |
Thanks for your understanding. Long-term speaking, we're going to completely remove the protobuf dependency. I guess this can be closed for now, please reopen if you run into any other issues. |
Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1) |
@mohamedagamy The Firebase team is working on upgrading their dependency. Please see this issue to track their progress. In the meantime, @kinex said that 1.3.0-rc1 works fine with Firebase. Have you tried that? |
Please reopen this if my last comment doesn't help you. We'll get to the bottom of this protobuf issue in 1.4.0 release and in a future release we'll completely remove protobuf. Thank you for your patience! |
#253 |
This is hopefully fixed in HEAD-SNAPSHOT. Please try it out to see if it helps. Instructions below.
|
sorry for being late but I have updated Gradle to be like this and it is working :) implementation 'com.google.crypto.tink:tink-android:HEAD-SNAPSHOT' |
Can confirm this also works for our case. Any rough timelines on when this change will release officially? |
We plan to release 1.4.0-RC2 by the end of this week. |
https://github.com/google/tink/releases/tag/v1.4.0-rc2 is here. Please upgrade and let us know if you encounter any issues. |
implementation "com.google.crypto.tink:tink-android:1.4.0-rc2" FATAL EXCEPTION: main |
@ilexbor a workaround can be found here #361 (comment). It'll be included in 1.4.0 release which is coming very soon. |
This error means that you are importing two packages that use Protobuf for your project, one of them has a distribution that's conflicting with the other.
To:
I hope I helped. |
I am trying to integrate Tink to my Flutter app which also uses Firebase. With 1.3.0-rc3 I get this build errors in Android:
I have tried various suggestions mentioned in other protobuf related issues here but no solution found so far.
Issue disappears if I downgrade Tink to version 1.3.0-rc1, so I am using it as a workaround for now.
The text was updated successfully, but these errors were encountered: