Closed fsener closed 4 years ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Getting totally the same problem. Android app crashes, but not always. The error in log is:
Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.messaging.FirebaseMessagingService>: java.lang.IllegalAccessError: Class com.google.firebase.iid.zzc extended by class com.google.firebase.messaging.FirebaseMessagingService is inaccessible (declaration of 'com.google.firebase.messaging.FirebaseMessagingService' appears in /data/app/com.gamepoint.bingo-1/base.apk:classes2.dex) 05-06 12:41:45.359 25379 25379 I art : at java.lang.Class java.lang.VMClassLoader.findLoadedClass!(java.lang.ClassLoader, java.lang.String) (VMClassLoader.java:-2) 05-06 12:41:45.359 25379 25379 I art : at java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) (ClassLoader.java:742) 05-06 12:41:45.359 25379 25379 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:362) 05-06 12:41:45.359 25379 25379 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 05-06 12:41:45.359 25379 25379 I art : at void android.app.ActivityThread.handleCreateService(android.app.ActivityThread$CreateServiceData) (ActivityThread.java:3323) 05-06 12:41:45.359 25379 25379 I art : at void android.app.ActivityThread.-wrap5(android.app.ActivityThread, android.app.ActivityThread$CreateServiceData) (ActivityThread.java:-1) 05-06 12:41:45.359 25379 25379 I art : at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1665) 05-06 12:41:45.359 25379 25379 I art : at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 05-06 12:41:45.359 25379 25379 I art : at void android.os.Looper.loop() (Looper.java:156) 05-06 12:41:45.359 25379 25379 I art : at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6605) 05-06 12:41:45.359 25379 25379 I art : at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) 05-06 12:41:45.359 25379 25379 I art : at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:999) 05-06 12:41:45.359 25379 25379 I art : at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:889)
I'm using latest Appsflyer, Onesignal, Firebase Deeplinks, Analytics, Crashlytics 6.14 from UPM. I already added link.xml, but it doesn' help:
<assembly fullname="Firebase.Crashlytics" ignoreIfMissing="1">
<namespace fullname="Firebase.Crashlytics" preserve="all"/>
</assembly>
<assembly fullname="Firebase.App" ignoreIfMissing="1">
<namespace fullname="Firebase.App" preserve="all"/>
</assembly>
Please help!
@fsener @gromilQaaaa Thank you for the information.
Based on the callstack, I suspect there are some issues when resolving Android libraries.
I noticed that several Unity plugins ships with PlayServicesResolver or ExternalDependencyManager (new name for PlayServicesResolver, EDM4U in brief) with their .unitypackage
, ex. OneSignal and Mopub. When you install Firebase through UPM, you will need to make sure all those libraries are removed before installing Firebase through UPM, since it will install External Dependency Manager through UPM as well. If not removed, there will be installation conflict.
When this happens, Unity will have trouble to load Firebase editor tool or EDM4U.
This installation conflict issue is quite complicated so we do not have a good solution for every scenario yet.
So the first thing you can try is:
PlayServicesResolver
or ExternalDependencyManager
folders under Assets
folder and remove them.Assets
folder, remove them.Assets
folder and you try to install a file with same GUID through UPM again, Unity will skip it. So reinstallation is recommended.)Assets > External Dependency Manager > Android Resolver > Force Resolve
menu item.PlayServicesResolver
or ExternalDependencyManager
folders are removed under Assets
folder.If the issue is installation conflict, your issue should be resolve at this point.
Could you try this first and see if this works for you? Shawn
Hello,
My first problem is that I was missing implementation project(':Firebase')
in my custom mainTemplate.gradle because our project is not using DEPS and I didn't realize it was missing, after that Firebase initialized correctly without needing to add res.srcDirs += 'Firebase/res'
Second problem (google play login) seems to be fixed after changing all Firebase libraries to the same GMS version which is 12.0.1 for us.
Thank you
Thanks for resolving this, I'll add a note about this to our internal troubleshooting document. Is it safe to close this issue?
Thanks for resolving this, I'll add a note about this to our internal troubleshooting document. Is it safe to close this issue?
Yes, thank you.
Please fill in the following fields:
Unity editor version: 2018.4.3f Firebase Unity SDK version: 6.14 Source you installed the SDK (.unitypackage or Unity Package Manager): Unity Package Manager Firebase plugins in use (Auth, Database, etc.): Analytics 17.3, Common 19.3 Messaging 12.0.1 Additional SDKs you are using (Facebook, AdMob, etc.): Facebook, Mopub, Safedk, OneSignal, Fabric Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac Platform you are targeting (iOS, Android, and/or desktop): iOS & Android Scripting Runtime (Mono, and/or IL2CPP): IL2CPP
Please describe the issue here:
Hi,
Just installed Firebase analytics unity plugins through UPM and having problem about building Android project properly.
Even though I have added both google-services.json, GoogleService-Info.plist to my Assets folder and python script actually generates proper XML out of it while building for Android, I was getting;
I have "fixed" this problem via adding
res.srcDirs += 'Firebase/res'
inside my Gradle sourcesets.However now whenever I try launch the game for the first time it crashes saying
After this crash it launches OK, but whenever I try to sign-in using Play Games Services, it crashes again;
Here's that part of GpgsLogin.java;
public void initialize(Activity activity, View viewForGamePopups) { this.activity = activity; this.viewForGamePopups = viewForGamePopups; GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN).build(); googleSignInClient = GoogleSignIn.getClient(activity, googleSignInOptions); }
Any ideas?
What's the issue repro rate? (eg 100%, 1/5 etc) 100%