-
Notifications
You must be signed in to change notification settings - Fork 441
[Bug] Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.0.1-runtime.jar (com.google.firebase:firebase-iid:20.0.1) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0) #1093
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
Comments
Hi @mikeypdev, This seems like a bug related to the dependencies. Could you provide the complete steps you've taken before facing this issue so that we can confirm this? |
Before updating to 8.0.0, I updated from 7.1.0 to 7.2.0 (this was 2 months ago). In the process of updating from 7.1.0 to 7.2.0, I removed the deprecated Google Game Package Registry from UPM, and migrated to local tgz files. I did the upgrade entirely outside of Unity, by manually adding a project-level GooglePackages folder containing the Firebase 7.2.0 and EDM tgz files and then updating Packages/manifest.json to remove the scopedRegistries entry for Google Game Package Repository, and update each Firebase SDK entry to point to the new local tgz files. I seem to recall trying to remove the InstanceID SDK at the time, and getting some errors. I'm afraid I don't remember the issue, as I decided it was easier to leave the SDK in place. I was able to move forward without further issues. In the process of updating from 7.2.0 to 8.0.0, I replaced the Firebase and EDM tgz files and manually updated Packages/manifest.json. I then encountered the Instance ID conflict when building for Android. I did not see any conflict or errors for Desktop or iOS builds. At this point, I was not using a custom gradle file for Android builds, so I enabled it in my project settings and EDM settings, did the upgrade from 7.2.0 to 8.0.0 again, and was then able to implement the workaround I noted above. |
Hi @mikeypdev, Could you try going to Assets > External Dependency Manager > Android Resolver > Force Resolve and see if the issue persists? |
I am also facing this issue after updating from 7.2.0 to 8.1.0. Tried doing Force Resolve via Assets > External Dependency Manager > Android Resolver > Force Resolve, but the issue still persists. I realised there is a change in Android Resolver Dependencies xml file. I had attached the two dependencies files, not sure if it helps. |
Also facing this issue. Also, @paulinon tried Force resolving with no fix. Seems like another case of dependency hell with firebase & unity 😭 . Strange thing as far as my project is concerned is that I'm not using InstanceId anywhere in my project 🤔 . |
@paulinon I can confirm that Force Resolve does not fix the issue for me. The workaround that I noted above is still required. |
Hi @mikeypdev, I haven't been able to reproduce your issue on my end so far. Could you try to make use of the quickstart and see if the issue persists there? If it does, please provide the steps you've taken. |
Hi all, I'm having the same problem. The only thing I did is upgrading Firebase (Analytics, Auth, Firestore) from 7.0.2 to 8.1.0 and add (database, functions, messaging, storage) at 8.1.0. It's been days I'm looking for fix |
I think this has something to do with EDM4U use Gradle setting. If I turn
it that on, I get issues, however if I leave settings at default and then
re add all packages the issue no longer persists.
…On Mon, Jul 26, 2021, 9:10 AM AhmadouDiarra ***@***.***> wrote:
Hi all, I'm having the same problem. The only thing I did is upgrading
Firebase (Analytics, Auth, Firestore) from 7.0.2 to 8.1.0 and add
(database, functions, messaging, storage) at 8.1.0. It's been days I'm
looking for fix
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1093 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWURKO7HCF5F4AEJHS52ZLTZWCIPANCNFSM5ADKOJVA>
.
|
Upgrading from 7.2.0 to 8.1.0. Got the same issue |
I can reproduce this in a blank project just with the Firebase Functions and Firebase Messaging installed. Unity version: 2020.3.15f1 Gradle error:
|
This was introduced in version 8.0.0 and I am amazed Firebase released 8.1.0 without fixing it. It only gets produced when you are using Messaging SDK. |
Workaround works. It would be better to include a dependency xml file in the project and then force resolve it. It will auto add it to the mainTemplate.gradle. |
Replying in order to flip the Needs Info status. I have not yet had a chance to repro in the Quickstart project, but @Jack37 seems to have a simple repro case. |
Also facing this, same as Jack37 above. Also reproduce under a blank project |
Hi all, We have a fix for this issue that should be in our next release In the meantime, if you would like try to use In
Then re-run the Android resolver. Note that we have not thoroughly tested this with I'm going to close this issue for now, but if you continue to encounter this problem after |
With 8.0.0, this fix does not work. The resolver ignores MessagingDependencies.xml and adds firebase-iid:20.0.01 rather than 21.1.0. I cannot believe that the team didn't even try to build a blank Firebase project before world-wide public distribution. Firebase-unity 8 should better be 8-alpha if things keep going this way. |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
Firebase Instance ID is deprecated, and I was not using it, so I removed the Instance ID SDK from my project when updating to SDK 8.0.0. In SDK 7.2.0, Instance ID implemented firebase-iid:21.1.0 on Android, as seen in mainTemplate.gradle. After removing Instance ID, and upgrading all other Firebase components to 8.0.0, there are no references to firebase-iid in mainTemplate.gradle or AndroidResolverDependecies.xml, as expected.
However, when building to Android, the gradle build fails with the following error:
Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-20.0.1-runtime.jar (com.google.firebase:firebase-iid:20.0.1) and jetified-firebase-messaging-22.0.0-runtime.jar (com.google.firebase:firebase-messaging:22.0.0)
I do not know where the reference to firebase-iid:20.0.1 is coming from.
As a workaround, I am able to solve the build error by manually adding a reference to firebase-iid:21.1.0 to my mainTemplate.gradle file:
implementation 'com.google.firebase:firebase-iid:21.1.0'
This is reproducible 100% of the time in my project, on two different development systems. I have not yet had the bandwidth to repro in any Quickstart example.
The text was updated successfully, but these errors were encountered: