Skip to content

gax library collision with google cloud gcp java client #655

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

Closed
loicortola opened this issue Apr 7, 2022 · 8 comments
Closed

gax library collision with google cloud gcp java client #655

loicortola opened this issue Apr 7, 2022 · 8 comments
Assignees

Comments

@loicortola
Copy link

loicortola commented Apr 7, 2022

[REQUIRED] Step 2: Describe your environment

  • Operating System version: MacOSX 12.0.1
  • Firebase SDK version: 8.1.1
  • Library version: Java 17
  • Firebase Product: auth (auth, database, storage, etc)

[REQUIRED] Step 3: Describe the problem

Firebase Admin SDK is getting old, and recently, Spring Cloud GCP https://github.com/GoogleCloudPlatform/spring-cloud-gcp updated their google cloud clients to the latest version, which uses a new major release of the google gax client https://mvnrepository.com/artifact/com.google.api/gax

Problem is: we cannot have both Firebase and Google Cloud libraries within the same runtime, as method signatures have changed since.
This is blocking for us, as we are forced to keep existing legacy versions and really need to upgrade soon.

Could you upgrade your project dependencies to the latest versions?

Thanks a lot for the great lib Google!

Steps to reproduce:

  • Add the latest firebase-sdk-admin and google-cloud-gcp dependencies in your pom.xml or build.gradle.
  • Initiate a FirebaseApp + a PubSubTemplate

App wont be able to start and a noSuchMethodError will throw.

More info on the error:

`

The following method did not exist:

'com.google.api.gax.core.GoogleCredentialsProvider$Builder com.google.api.gax.core.GoogleCredentialsProvider$Builder.setUseJwtAccessWithScope(boolean)'

The calling method's class, com.google.cloud.pubsub.v1.stub.PublisherStubSettings, was loaded from the following location:

jar:file:/Users/loicortola/.gradle/caches/modules-2/files-2.1/com.google.cloud/google-cloud-pubsub/1.115.5/8ef4349a5bd22d7bd8174267e44c1ecd1828a217/google-cloud-pubsub-1.115.5.jar!/com/google/cloud/pubsub/v1/stub/PublisherStubSettings.class

The called method's class, com.google.api.gax.core.GoogleCredentialsProvider$Builder, is available from the following locations:

jar:file:/Users/loicortola/.gradle/caches/modules-2/files-2.1/com.google.api/gax/1.66.0/8320f0ee0dd4200ffd8abdf9f16a21f2b64ce9b2/gax-1.66.0.jar!/com/google/api/gax/core/GoogleCredentialsProvider$Builder.class
jar:file:/Users/loicortola/.gradle/caches/modules-2/files-2.1/com.google.api/gax/2.11.0/91ba35a0af71719b96070322d2ebc58fb598ab7c/gax-2.11.0.jar!/com/google/api/gax/core/GoogleCredentialsProvider$Builder.class

The called method's class hierarchy was loaded from the following locations:

com.google.api.gax.core.GoogleCredentialsProvider.Builder: file:/Users/loicortola/.gradle/caches/modules-2/files-2.1/com.google.api/gax/1.66.0/8320f0ee0dd4200ffd8abdf9f16a21f2b64ce9b2/gax-1.66.0.jar

`

@lahirumaramba
Copy link
Member

Thanks @loicortola for filing this issue. I believe we need to update

<version>20.9.0</version>
to fix this. (please let me know if you were referring to a different library). I will take a look at this to see how it affects the rest of the dependencies.

@loicortola
Copy link
Author

Dear @lahirumaramba ,

this is absolutely exact.
Updating it to 25.1.0 would solve the issue

@loicortola
Copy link
Author

For what it's worth, anything beyond 21.0.0 would work as it is the main version where they did major upgrades on many items in the bom.

Thanks a lot for your time and your quick response, let me know if I can do anything else to assist.

@loicortola
Copy link
Author

@lahirumaramba, any updates? Would you like me to try a PR? I see there's already a bot which made a recent PR, I could take it from there?

@loicortola
Copy link
Author

@lahirumaramba ?

@lahirumaramba
Copy link
Member

Hi @loicortola Thank you for your patience! We need to confirm what we are breaking before dropping support for Java 7. I have have prioritized this task and will track any updates here. Thanks!

@loicortola
Copy link
Author

loicortola commented May 5, 2022 via email

@lahirumaramba
Copy link
Member

This is now fixed in v9.0.0. Thank you!

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

No branches or pull requests

3 participants