Skip to content
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

Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found (BoM 31.0.0) #4206

Closed
thatfiredev opened this issue Oct 14, 2022 · 14 comments · Fixed by #4225
Closed

Comments

@thatfiredev
Copy link
Member

[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:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Dolphin
  • Firebase Component: Functions, Messaging
  • Component version: BoM 31.0.0

[REQUIRED] Step 3: Describe the problem

After upgrading to the BoM 31.0.0, I see the following error in the logcat:

Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules
firebase-iid-20.0.1-runtime (com.google.firebase:firebase-iid:20.0.1)
and firebase-messaging-23.1.0-runtime (com.google.firebase:firebase-messaging:23.1.0)

Steps to reproduce:

Add the BoM, firebase-messaging and firebase-functions dependencies:

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

    implementation 'com.google.firebase:firebase-functions'
    implementation 'com.google.firebase:firebase-messaging'

A current workaround is to also define the iid version explicitly:

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

    implementation 'com.google.firebase:firebase-functions'
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-iid:21.1.0'

But it would be nice if the fix was implemented on the SDK itself.

@ColtonIdle
Copy link

Came here to report this. Simply updated BOM and got hit with this error. Thanks for the current workaround @thatfiredev

@KVAMALRAJ
Copy link

I am facing same issue, after updating FB Bom to 31.0.1

@mikehardy
Copy link

@KVAMALRAJ it was not resolved yet, 31.0.1 only contained a fix to crashlytics crash bug. That's why this issue is still open. The team here will make a fix close the issue, then do a release likely with release notes indicating it is fixed, when it is fixed https://firebase.google.com/support/release-notes/android - here

@ColtonIdle
Copy link

This does not seem to be fixed in 31.0.2. Will provide more details in a few, but I just updated and I have the same issue.

@ColtonIdle
Copy link

Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules firebase-iid-20.0.1-runtime (com.google.firebase:firebase-iid:20.0.1) and firebase-messaging-23.1.0-runtime (com.google.firebase:firebase-messaging:23.1.0)

Using latest 31.0.2. Lets see if the previous workaround fixes the issue here too

@ColtonIdle
Copy link

If I add

implementation("com.google.firebase:firebase-iid:21.1.0")

then were good

@mikehardy
Copy link

@ColtonIdle the issue was fixed but the commit is untagged / has not been released yet: d939e63 - so I think you should still expect to see the error + need the workaround

@ColtonIdle
Copy link

oooh. i read the above message as "its fixed in 31.0.2". sounds good. looking forward to trying out the fix soon

@TrustyTechSG
Copy link

Is 31.0.3 fixed this? we also have this issue on Expo cloud build on 31.0.2([react-native-firebase][16.4.3])

@mikehardy
Copy link

@TrustyTechSG still showing as "unreleased" when I look: https://github.com/firebase/firebase-android-sdk/blob/master/firebase-functions/CHANGELOG.md#unreleased

And I don't see functions as part of the 31.0.3 release https://firebase.google.com/support/release-notes/android

So I do not think it has been released.

I am the maintainer of react-native-firebase and I think we have a workaround in place in the repository such that this should not actually affect any react-native-firebase users https://github.com/invertase/react-native-firebase/blob/main/packages/messaging/android/build.gradle#L120

If you have a problem please open it in react-native-firebase repository issues list providing full details and we can attend to it

@TrustyTechSG
Copy link

@TrustyTechSG still showing as "unreleased" when I look: https://github.com/firebase/firebase-android-sdk/blob/master/firebase-functions/CHANGELOG.md#unreleased

And I don't see functions as part of the 31.0.3 release https://firebase.google.com/support/release-notes/android

So I do not think it has been released.

I am the maintainer of react-native-firebase and I think we have a workaround in place in the repository such that this should not actually affect any react-native-firebase users https://github.com/invertase/react-native-firebase/blob/main/packages/messaging/android/build.gradle#L120

If you have a problem please open it in react-native-firebase repository issues list providing full details and we can attend to it

Thank you Mike

@svenjacobs
Copy link

It seems this was fixed in version 20.2.1 of firebase-functions which is also part of Firebase BOM 31.1.0.

@rlazo
Copy link
Collaborator

rlazo commented Nov 18, 2022

@svenjacobs @TrustyTechSG yes, the latest version of functions should fix this issue. Please let us know if it doesn't!

@svenjacobs
Copy link

Yes, 20.2.1 fixes it for me. Many thanks 👍🏼

@firebase firebase locked and limited conversation to collaborators Nov 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants