Closed srdmnc closed 4 years ago
This issue might be related to this but it is on the OneSignal Android SDK.
Anyone there?
Here's another log from App Center
:
at sjh.d(:com.google.android.gms@19420046@19.4.20(120400-271418971): 4)
at sjy.a(:com.google.android.gms@19420046@19.4.20(120400-271418971): 47)
at qwv.b(:com.google.android.gms@19420046@19.4.20(120400-271418971): 267)
at ... 3 more(: ) Java.Lang.IllegalStateException: Default FirebaseApp is not initialized in this process [package name]. Make sure to call FirebaseApp.initializeApp(Context) first.
at Java.Interop.JniEnvironment+StaticMethods.CallStaticObjectMethod(Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args)(<215a47b3a1e94f29ba6a610775927d69>: 0)
at Java.Interop.JniPeerMembers+JniStaticMethods.InvokeObjectMethod(System.String encodedMember, Java.Interop.JniArgumentValue* parameters)(<215a47b3a1e94f29ba6a610775927d69>: 0)
at Firebase.Iid.FirebaseInstanceId.get_Instance()(<8c02bc8ae6d44a47ba32c590764f10f3>: 0)
at Microsoft.AppCenter.Push.TokenService.OnTokenRefresh()(<84b4812a3e494bc9b0fa3bea6a4d2785>: 0)
at Firebase.Iid.FirebaseInstanceIdService.n_OnTokenRefresh(System.IntPtr jnienv, System.IntPtr native__this)(<8c02bc8ae6d44a47ba32c590764f10f3>: 0)
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.83(intptr,intptr)(: ) java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process [package name]. Make sure to call FirebaseApp.initializeApp(Context) first.
at com.google.firebase.FirebaseApp.getInstance(:245)(: )
at com.google.firebase.iid.FirebaseInstanceId.getInstance(:1)(: )
at md50d7658ca0fc01b95086956189e698682.TokenService.n_onTokenRefresh(Native Method: )
at md50d7658ca0fc01b95086956189e698682.TokenService.onTokenRefresh(:29)(: )
at com.google.firebase.iid.FirebaseInstanceIdService.zzd(:6)(: )
at com.google.firebase.iid.zzg.run(:4)(: )
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 641)
at com.google.android.gms.common.util.concurrent.zza.run(:6)(: )
at java.lang.Thread.run(Thread.java: 919) : at md50d7658ca0fc01b95086956189e698682.TokenService.n_onTokenRefresh(Native Method: ) :
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 641) :
at java.lang.Thread.run(Thread.java: 919)
1) Please include your gradle file 2) Are you using another Firebase project in your app?
@rgomezp
@srdmnc I do see Microsoft.AppCenter.Push.TokenService.OnTokenRefresh
in the stacktrace of your crash and not OneSignal. If you don't need to use App Center push with OneSignal at the same time can you disable AppCenter push by removing it or disabling it in another way?
@jkasten2 Oh, I missed that. Removing Microsoft.AppCenter.Push
solved this issue.
Thanks!
Description:
App crashes on FIRST RUN due to FATAL EXCEPTION: Firebase-TokenService. But when opening the app again (after the crash), everything works fine. This might have to do with the initialization of the "FirebaseApp" in the SDK (?) I'm not really sure. I already tried surrounding the OneSignal.Current.StartInit("app_id").EndInit() in a try-catch but the error/crash still persist.
Environment
Steps to Reproduce Issue:
Anything else: