Skip to content
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

Conflict Between Firebase Packages and Flutter_reactive_blue #115

Closed
plyrek opened this issue Oct 6, 2020 · 7 comments · Fixed by #116
Closed

Conflict Between Firebase Packages and Flutter_reactive_blue #115

plyrek opened this issue Oct 6, 2020 · 7 comments · Fixed by #116
Assignees
Labels
Android Android-specific ticket

Comments

@plyrek
Copy link

plyrek commented Oct 6, 2020

The Firebase Packages:
firebase_core: ^0.5.0
firebase_auth: ^0.18.0+1
cloud_firestore: ^0.14.0+2
recently updated to use protobuf-javalite - 3.110.jar which conflicts with the jar file protobuf-lite-3.0.1.jar used in your package making any app which uses Firebase incompatible with your package. You are not alone, several ble packages use this jar and are incompatible, Your package however, was very recently updated and seems active and I thought you would like to know.

To Reproduce
Steps to reproduce the behavior:
Add the following to pubspec.yaml and try to build an android app
firebase_core: ^0.5.0
firebase_auth: ^0.18.0+1
cloud_firestore: ^0.14.0+2
flutter_reactive_ble: ^2.5.1

Expected behavior
A clean build to an Android device or emulator

Actual behavior
Build fails with the following errors
1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)

@plyrek plyrek changed the title Conflict between Firebase Packages and Flutter_reactive_blue Conflict Between Firebase Packages and Flutter_reactive_blue Oct 6, 2020
@werediver werediver added the Android Android-specific ticket label Oct 6, 2020
@remonh87 remonh87 self-assigned this Oct 7, 2020
@remonh87
Copy link
Contributor

remonh87 commented Oct 7, 2020

@plyrek thanks for reporting the issue. I couldn't reproduce it by using the steps you supplied. What I did was following:

  1. Create flutter sample project
  2. Integrate the dependencies like you said.
  3. Build it on a google pixel2 device (which was successful).

I did however upgrade the protobuf dependencies and will integrate them soon in master. Can you test it with your project again? Else I need a bit more info:

  • output of flutter doctor
  • build.gradle file where you declare the depedencies. If that is problematic please let me know which gradle version, external depedencies and android tools you are using

@plyrek
Copy link
Author

plyrek commented Oct 7, 2020

Thank you so much for your quick action on this issue. The updating of protobuf dependencies did the trick! It is contributors like you that make the Flutter community such a great one!

@archanpaul
Copy link

archanpaul commented Nov 11, 2020

The problem persists with following :

pubspec.yaml

firebase_core: ^0.5.2
firebase_auth: ^0.18.3
cloud_firestore: ^0.14.3
firebase_remote_config: ^0.4.2
firebase_admob: ^0.10.2
flutter_reactive_ble: ^2.6.1+1

Error

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)

Considering lot of people use the firebase, it will be good if flutter_reactive_ble remain compatible with protobuf library of firebase plugins.

Requesting @remonh87 to reopen this issue.

@remonh87
Copy link
Contributor

remonh87 commented Nov 11, 2020

@archanpaul I will reopen it because of the visibility for us. We have btw a version with the latest protobuf: 2.6.1 but unfortunately we had to drop it because of the firebase info you mentioned. One question: do you have declared the firebase BOM separately in your gradle file? I am just wondering why you get the latest protobuf by default and I get a lower version of protobuf.

@remonh87 remonh87 reopened this Nov 11, 2020
@archanpaul
Copy link

archanpaul commented Nov 11, 2020

@remonh87 No I have not declared firebase BOM in gradle. For me only this combination works ..

firebase_core: ^0.5.0
firebase_auth: ^0.18.1+1
cloud_firestore: ^0.14.1+2
firebase_remote_config: ^0.4.0+1
flutter_reactive_ble: ^2.6.1+1

I can't fit in flutter_admob any versions at all.

remonh87 added a commit that referenced this issue Nov 16, 2020
this one is more optimized for android. Fix for #115
@remonh87
Copy link
Contributor

This issue is fixed in version 2.7.1

@archanpaul
Copy link

Thank you @remonh87 for the fix. Working with following (all latest as of today) :
firebase_core: ^0.5.2
firebase_auth: ^0.18.3
cloud_firestore: ^0.14.3
firebase_remote_config: ^0.4.2
flutter_reactive_ble: ^2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android-specific ticket
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants