Component Auth Google causing crash on startup

The Google Auth component is causing a crash on startup due to a conflict with several extensions I use after the last update. Just add the component that crashes the app. The logs I have are these..

10-17 21:38:20.509  8165  8165 E Form    : Uncaught Exception
10-17 21:38:20.509  8165  8165 E Form    : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.connectapp.ScoreBoard/io.kodular.connect.Placar_Eletronico.Screen1}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.connectapp.ScoreBoard. Make sure to call FirebaseApp.initializeApp(Context) first.
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4311)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4459)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2853)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.os.Handler.dispatchMessage(Handler.java:108)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.os.Looper.loopOnce(Looper.java:226)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.os.Looper.loop(Looper.java:328)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.ActivityThread.main(ActivityThread.java:9224)
10-17 21:38:20.509  8165  8165 E Form    : 	at java.lang.reflect.Method.invoke(Native Method)
10-17 21:38:20.509  8165  8165 E Form    : 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
10-17 21:38:20.509  8165  8165 E Form    : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
10-17 21:38:20.509  8165  8165 E Form    : Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.connectapp.ScoreBoard. Make sure to call FirebaseApp.initializeApp(Context) first.
10-17 21:38:20.509  8165  8165 E Form    : 	at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:184)
10-17 21:38:20.509  8165  8165 E Form    : 	at com.google.firebase.auth.FirebaseAuth.getInstance(com.google.firebase:firebase-auth@@21.0.3:1)
10-17 21:38:20.509  8165  8165 E Form    : 	at com.google.appinventor.components.runtime.KodularFirebaseAuthentication.<init>(KodularFirebaseAuthentication.java:118)
10-17 21:38:20.509  8165  8165 E Form    : 	at java.lang.reflect.Constructor.newInstance0(Native Method)
10-17 21:38:20.509  8165  8165 E Form    : 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
10-17 21:38:20.509  8165  8165 E Form    : 	at gnu.expr.PrimProcedure.apply(PrimProcedure.java:272)
10-17 21:38:20.509  8165  8165 E Form    : 	at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
10-17 21:38:20.509  8165  8165 E Form    : 	at gnu.mapping.CallContext.runUntilValue(CallContext.java:298)
10-17 21:38:20.509  8165  8165 E Form    : 	at gnu.kawa.reflect.Invoke.applyN(Invoke.java:209)
10-17 21:38:20.509  8165  8165 E Form    : 	at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39)
10-17 21:38:20.509  8165  8165 E Form    : 	at io.kodular.connect.Placar_Eletronico.Screen1.$define(Screen1.yail:10254)
10-17 21:38:20.509  8165  8165 E Form    : 	at com.google.appinventor.components.runtime.Form.onCreateFinish(Form.java:484)
10-17 21:38:20.509  8165  8165 E Form    : 	at com.google.appinventor.components.runtime.Form.onCreate(Form.java:369)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.Activity.performCreate(Activity.java:8936)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.Activity.performCreate(Activity.java:8900)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
10-17 21:38:20.509  8165  8165 E Form    : 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4287)
10-17 21:38:20.509  8165  8165 E Form    : 	... 12 more
10-17 21:38:20.509  8165  8165 E Form    : Form Screen1 ErrorOccurred, errorNumber = 909, componentType = Screen1, functionName = <unknown>, messages = java.lang.RuntimeException: Unable to start activity ComponentInfo{com.connectapp.ScoreBoard/io.kodular.connect.Placar_Eletronico.Screen1}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.connectapp.ScoreBoard. Make sure to call FirebaseApp.initializeApp(Context) first.

Hi dear,

Which extensions are you using?

If you check logs carefully, you’ll see that the extensions aren’t responsible for the crash.

Hi :raising_hands:vknow:raising_hands:

I’m reading this,

Default FirebaseApp is not initialized in this process com.connectapp.ScoreBoard. Make sure to call FirebaseApp.initializeApp(Context) first

but isn’t it Firebase that’s conflicting with some extension?

If you remove the Auth component it works.

Can you check firebase auth alone works or not?

yes, it works perfectly alone without FCM

At this point, I believe it’s your extension that’s causing the conflict :face_with_diagonal_mouth:

Yes, you are right.

I’m not entirely sure whether the Firebase Init Provider was declared in the manifest earlier, but one thing is clear that my extension was compatible with Firebase Auth component before this latest update. Usually, conflicts arise because of classes, but this time it seems the issue was caused by the provider being declared in manifest.

I’ll fix this right away.

1 Like

Yes, I know very well, you always do an excellent job with your extensions :clap::clap::clap:

:partying_face: