Open CloudLevi opened 1 week ago
Hi @CloudLevi, thank you for reaching out. I was able to reproduce the issue. I'll notify our engineers about this and see what we do here. Thanks!
This is a known issue when using protobuf-java
and protobuf-javalite
at the same time. See protobuf/issues/8104 for context.
You'll need to exclude either javalite or protobuf-java.
@daymxn thank you for your response. The thing is, I've tried many combinations of excluding modules and still can't get a successful build. I'll list some examples of what I've tried.
protobuf-javalite
Code:
configurations {
implementation.exclude module:'protobuf-javalite'
}
Result: Build fails, seems to be caused by a conflict between com.google.api.grpc:proto-google-common-protos
and com.google.firebase:protolite-well-known-types
(see file: exclude_javalite_only.txt)
protobuf-javalite
and protolite-well-known-types
Code:
configurations {
implementation.exclude module:'protobuf-javalite'
implementation.exclude module:'protolite-well-known-types'
}
Result: Build succeeds, but app immediately crashes due to firestore failing to initialize. (see file: exclude_javalite_and_well_known_types.txt)
protobuf-javalite
and proto-google-common-protos
Code:
configurations {
implementation.exclude module:'protobuf-javalite'
implementation.exclude module:'proto-google-common-protos'
}
Result: Build fails due to conflicts between protobuf-java
and com.google.firebase:protolite-well-known-types
. (see file: exclude_javalite_and_google_common_protos.txt)
protobuf-java
Code:
configurations {
implementation.exclude module:'protobuf-java'
}
Result: build fails due to missing classes for pubsub (these are the ones I used in the project, I'm sure there are others):
class file for com.google.protobuf.MessageOrBuilder not found
class file for com.google.protobuf.GeneratedMessageV3 not found
I understand that most likely the answer lies in one of these configurations, but for now I couldn't find a combination with which the app will build and there will be no runtime errors. Any help would be appreciated, thank you.
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
When using firebase APIs with
com.google.cloud:google-cloud-pubsub
, I am not able to build the project due to many duplicate class errors. If I add the following exclusions in thebuild.gralde
, the app is able to run, but firebase services fail immediately:Steps to reproduce:
Try to build the project with firebase APIs and google cloud pubsub.
Relevant Code:
Versions of firebase APIs used:
Google Cloud PubSub version used:
Build error output attached in a file: firebase_conflict_error_output.txt