Upgrading from com.google.gms.google-services 4.3.5 to 4.3.10 breaks FirebaseApp.initializeApp
See original GitHub issue[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 Bumblebee | 2021.1.1 Patch 3 Build #AI-211.7628.21.2111.8309675, built on March 16, 2022 Runtime version: 11.0.11+0-b60-7590822 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.6.5 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 24 Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false Non-Bundled Plugins: org.jetbrains.kotlin (211-1.6.21-release-334-AS7442.40)
- Firebase Component:
com.google.gms.google-services
(Database, Firestore, Storage, Functions, etc) - Component version:
4.3.10
[REQUIRED] Step 3: Describe the problem
I upgraded com.google.gms.google-services
from 4.3.5
to 4.3.10
, and now my release
build crashes on startup with the following:
2022-04-28 12:07:11.456 13536-13536/? W/FirebaseApp: Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project.
2022-04-28 12:07:11.468 13536-13536/? W/FirebaseApp: Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project.
java.lang.RuntimeException: Unable to create application tv.twitch.android.app.consumer.TwitchApplication: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process tv.twitch.android.qa. Make sure to call FirebaseApp.initializeApp(Context) first.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6767)
at android.app.ActivityThread.access$1500(ActivityThread.java:256)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
This looks very similar to https://github.com/firebase/firebase-android-sdk/issues/2894
Steps to reproduce:
Upgraded com.android.library
and com.android.application
from 7.1.0
to 7.1.3
and com.google.gms.google-services
from 4.3.5
to 43.10
. Then run a bundleRelease
task.
Relevant Code:
N/A
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Thanks! I filed https://github.com/google/play-services-plugins/issues/225
For others that find this: I can see my
google-services.json
client/api_key/current_key
in my.apk
file, but not in my.aab
file. More details are in the linked issue.With these details, it looks like the main issue not with Firebase but rather with the
google-services.json
. Could you file an issue on this repo? You can continue your report there, and they’ll be able to assist you better. That being said, I’ll be closing this issue now. Thanks!