question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build time error with external grpc dependencie

See original GitHub issue

[REQUIRED] Step 2: Build time

  • Android Studio version: Android Studio Flamingo | 2022.2.1 Canary 8 Build #AI-222.4345.14.2221.9252092, built on November 3, 2022 Runtime version: 17.0.4.1+0-17.0.4.1b469.62-9127311 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.0.1 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 8 Metal Rendering is ON Registry: external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false gradle.version.catalogs.dynamic.support=true

  • Firebase Component: messaging, perf, crashlytics, analytics

  • Component version: firebase-bom:31.1.0

[REQUIRED] Step 3: when compiling the project with a grpc dependency in another module it generates duplicate class conflicts

Steps to reproduce:

Add grpc library to module app

implementation('io.grpc:grpc-okhttp:1.50.2')
implementation('io.grpc:grpc-stub:1.50.2')
implementation('io.grpc:grpc-protobuf:1.50.2')

and add firebase libraries

implementation platform('com.google.firebase:firebase-bom:31.1.0')

implementation "com.google.firebase:firebase-messaging"
implementation "com.google.firebase:firebase-functions-ktx"
implementation "com.google.firebase:firebase-perf"
implementation "com.google.firebase:firebase-crashlytics"
implementation "com.google.firebase:firebase-analytics"

Relevant Code:

error build

Duplicate class com.google.api.Advice found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.Advice$1 found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.Advice$Builder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AdviceOrBuilder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AnnotationsProto found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthProto found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthProvider found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthProvider$1 found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthProvider$Builder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthProviderOrBuilder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthRequirement found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthRequirement$1 found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthRequirement$Builder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthRequirementOrBuilder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.Authentication found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.Authentication$1 found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.Authentication$Builder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0) Duplicate class com.google.api.AuthenticationOrBuilder found in modules jetified-proto-google-common-protos-2.9.0 (com.google.api.grpc:proto-google-common-protos:2.9.0) and jetified-protolite-well-known-types-18.0.0-runtime (com.google.firebase:protolite-well-known-types:18.0.0)

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jaimemensajeroscommented, Nov 28, 2022

@argzdev If it’s firebase-perf, it’s the one that has that duplication of the libraries, exactly this library com.google.firebase:protolite-well-known-types:18.0.0

0reactions
linyinlyucommented, Dec 1, 2022

Hi @jaimemensajeros @argzdev , wondering if you see this issue for other firebase libraries, or just firebase-perf?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java grpc runtime error - build.gradle - Stack Overflow
I am trying to compile and a run a java grpc client using only local dependencies, but I am getting the following error:...
Read more >
Trouble-Shooting | grpc-spring-boot-starter - GitHub Pages
The server/client does not start because some class or method is missing. This is usually the case if the grpc-libraries use slightly different...
Read more >
Compilation Error while generating code using route_guide ...
to grpc.io. Hi,. My environment is. - JDK - jdk1.7.0_67. - OS - windows-x86_64. Any clue on this compilation error ?
Read more >
Protocol Buffers/gRPC Codegen Integration Into .NET Build
Tools as a development-only dependency, so that the users of your library do not fetch the tools package: “dotnet SDK” .csproj (Visual Studio,...
Read more >
Authentication - gRPC
An overview of gRPC authentication, including built-in auth mechanisms, ... At run-time, this credential handles communication with the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found