firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.26k stars 574 forks source link

Old version of Jackson leaked into classpath causing compatibility issues #3004

Closed eygraber closed 1 year ago

eygraber commented 3 years ago

This plugin (as of v 2.2.0) is leaking an older version of jackson (2.10.2) via com.google.api-client:google-api-client:1.30.9 and this is causing incompatibilities with other libraries that use newer versions of Jackson.

google-oss-bot commented 3 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

aguatno commented 3 years ago

@eygraber thanks for reporting. I'd like to clarify about this plugin that leads to incompatibilities? It would be better if you could share MCVE so we can have a better look. Thanks.

google-oss-bot commented 3 years ago

Hey @eygraber. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

eygraber commented 3 years ago

MCVE firebase-3004.zip

If you run gradle :app:firebase3004 you will get the error:

'com.fasterxml.jackson.core.util.JacksonFeatureSet com.fasterxml.jackson.core.JsonParser.getReadCapabilities()'

If you uncomment the explicit classpath dependency in the root build.gradle.kts and run gradle :app:firebase3004 the error does not occur.

aguatno commented 2 years ago

HI @eygraber thanks for mcve. I'm not quite sure if the compatibility is caused by Firebase. Have you tried com.google.api-client:google-api-client:1.31.5?

eygraber commented 2 years ago

I'm not using google-api-client directly, but Firebase is (I believe through the app distribution plugin), which is causing the leak onto the classpath.

I'm not sure if there's a way to remedy this with Gradle, or if the solution is for Firebase to shade their Jackson dependency so it doesn't clash.

eygraber commented 2 years ago

The short term solution would be for the firebase plugin to use a newer version of google-api-client that uses a newer version of Jackson.

eygraber commented 1 year ago

Updating to com.google.api-client:google-api-client:1.30.10 should fix this issue (unless the version of Jackson it uses has become an issue in the year+ since I filed this).

argzdev commented 1 year ago

Hey, thanks for notifying us, @eygraber. Let me see if I can get some feedback/updates regarding this from our engineers.

argzdev commented 1 year ago

It seems that this has been fixed in version 2.1.2. Please do note that the current latest version is now at 3.1.1, we recommend using the latest version to avoid bugs that has already been fixed in the most recent version. That said, since this has been resolved, I'll close this issue for now. Feel free to ask this to be reopened if you think this is a mistake. Thanks!

eygraber commented 1 year ago

Oh interesting, don't know how I missed that. Thank you!