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.

java.lang.AbstractMethodError: Receiver class com.google.api.gax.grpc.InstantiatingGrpcChannelProvider does not define or inherit an implementation of the resolved method 'abstract com.google.api.gax.rpc.TransportChannelProvider withExecutor(java.util.concurrent.Executor)' of interface com.google.api.gax.rpc.TransportChannelProvider.

See original GitHub issue

Using com.google.firebase:firebase-admin:6.14.0 in a simple app fetching a single document by ID in Firestore, I am getting the following runtime exception:

Caused by: java.lang.AbstractMethodError: Receiver class com.google.api.gax.grpc.InstantiatingGrpcChannelProvider does not define or inherit an implementation of the resolved method ‘abstract com.google.api.gax.rpc.TransportChannelProvider withExecutor(java.util.concurrent.Executor)’ of interface com.google.api.gax.rpc.TransportChannelProvider.

I authenticated using end-user credentials from Google Cloud SDK. There is no Firebase or Google dependency other than firebase-admin. My OS is Fedora 32.

It seems the problem comes from the version of gax-grpc that is retrieved by firebase-admin since forcing Gradle to use the latest version resolves the problem:

implementation 'com.google.api:gax-grpc:1.57.0'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
BenWhiteheadcommented, Jul 7, 2020

@lpellegr I spoke with some colleagues today and have some more detail for you.

Since your app has a direct dependency on google-cloud-core the recommendation from the GCP Java OSS team is to try using the libraries-bom for version resolution. This provides the benefit that a release of libraries-bom ensures all dependencies defined in it are binary compatible across the full dependency graph for all of the included projects (including grpc, guava, google-cloud-* and more. See The Google Cloud Platform Libraries BOM for links to all libraries) client libraries.

The version of libraries-bom which corresponds with the versions of google-cloud-firestore and google-cloud-storage used by firebase-admin is 6.0.0.

You can try out using the bom in your gradle project by updating your config as follows:

dependencies {
  implementation platform('com.google.cloud:libraries-bom:6.0.0')
  implementation 'com.google.cloud:google-cloud-core'
  implementation 'com.google.firebase:firebase-admin:6.14.0' 
}

@hiranya911 Do you think it would probably be beneficial to update firestore-admin to itself use libraries-bom. Does this sounds like a good idea to you? Should I create a new issue?

0reactions
lpellegrcommented, Jul 8, 2020

@BenWhitehead Thanks for the clear explanation and help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AbstractMethodError: Receiver class com.google.api.gax.grpc ...
InstantiatingGrpcChannelProvider does not define or inherit an implementation of the resolved method abstract needsCredentials()Z of interface com.google.api.
Read more >
Bigtable InstantiatingGrpcChannelProvider does not define or ...
After creating a gradle project with the same dependencies (and using JDK 11), I also received this error.
Read more >
Class InstantiatingGrpcChannelProvider (2.20.1) - Google Cloud
InstantiatingGrpcChannelProvider is a TransportChannelProvider which constructs a gRPC ManagedChannel with a number of configured inputs every time ...
Read more >
AbstractStub (grpc-all 1.51.1 API)
Common base type for stub implementations. Stub configuration is immutable; changing the configuration returns a new stub with updated configuration.
Read more >
google-cloud-bigquery:2.7.0 - jar, it executes a function in
MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;; at com.google.api.gax.retrying.BasicRetryingFuture.<init>(BasicRetryingFuture.java:88) ...
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