question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hborderscommented, May 3, 2022

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.

0reactions
argzdevcommented, May 3, 2022

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default FirebaseApp is not initialized - android - Stack Overflow
It seems that com.google.gms:google-services:4.3.9 has an issue. We can either UPGRADE it to classpath 'com.google.gms:google-services:4.3.10'.
Read more >
The Google Services Gradle Plugin
The google-services plugin has two main functions: Process the google-services.json file and produce Android resources that can be used in your application's ...
Read more >
Unable to sync Gradle with Firebase Crashlytic 2.6.0 using ...
The accepted answer is a good workaround but downgrading version is not a proper solution. So according to this answer upgrading gradle version ......
Read more >
FirebaseApp - Google
In the event that an app requires access to another Firebase project in addition to the default project, FirebaseApp#initializeApp(Context, FirebaseOptions, ...
Read more >
Bug: using "com.google.gms:google-services:4.1.0" causes ...
Bug: using "com.google.gms:google-services:4.1.0" causes "IllegalArgumentException: Crashlytics found an invalid API key: null. " · Status Update · Description.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found