Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google-services:4.3.9 breaks firebase #197

Closed
ColtonIdle opened this issue Aug 7, 2021 · 8 comments
Closed

google-services:4.3.9 breaks firebase #197

ColtonIdle opened this issue Aug 7, 2021 · 8 comments

Comments

@ColtonIdle
Copy link

Android app

My root build.gradle.kts contains

    dependencies {
        classpath("com.google.gms:google-services:4.3.8")

I updated today com.google.gms:google-services:4.3.8 to com.google.gms:google-services:4.3.9 and my android app crashes on launch now due to firebase.

2021-08-06 22:30:10.671 13469-13469/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.rollertoaster.app.free, PID: 13469
    java.lang.RuntimeException: Unable to resume activity {com.rollertoaster.app.free/com.rollertoaster.app.MainActivity}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.rollertoaster.app.free. Make sure to call FirebaseApp.initializeApp(Context) first.
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4205)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.rollertoaster.app.free. Make sure to call FirebaseApp.initializeApp(Context) first.
        at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:183)
        at com.google.firebase.perf.FirebasePerformance.getInstance(FirebasePerformance.java:132)
        at com.google.firebase.perf.FirebasePerformanceInitializer.onAppColdStart(FirebasePerformanceInitializer.java:29)
        at com.google.firebase.perf.application.AppStateMonitor.sendAppColdStartUpdate(AppStateMonitor.java:274)
        at com.google.firebase.perf.application.AppStateMonitor.onActivityResumed(AppStateMonitor.java:195)
        at android.app.Application.dispatchActivityResumed(Application.java:436)
        at android.app.Activity.dispatchActivityResumed(Activity.java:1265)
        at android.app.Activity.onResume(Activity.java:1789)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)
        at android.app.Activity.performResume(Activity.java:7939)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237) 
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) 
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 

If I revert back from .9 to .8, then everything works again.

@rmazajev
Copy link

rmazajev commented Aug 7, 2021

Having exactly same issue after upgrading project to use gradle 7.0 Reverting back to com.google.gms:google-services:4.3.8 fix the problem.

@davidmotson
Copy link
Collaborator

google-services-plugin 4.3.10 is now live and should fix the above issue, please re-open if this is not the case.

@ColtonIdle
Copy link
Author

Confirmed. Fixed for me. Thank you for the quick turnaround.

@jd565
Copy link

jd565 commented Nov 26, 2021

We are still periodically hitting this issue on 4.3.10. Some of the builds coming from our CI machine will hit this error, and then the next build will be fine.
I am unsure whether it is a caching issue or what exactly.
When I look on the build machine the values.xml file is in the correct place, but looking in the output APK, the string 'google_app_id' does not appear in the 'resources.arsc' file (according to grep). It does appear in that file for builds that work.

@auras
Copy link

auras commented Dec 15, 2021

Confirm it happens as well intermittently on 4.3.10

@wilsonszh
Copy link

Hi all, I had the issue @jd565 hitting too in my android project (Error in the code, but still able to build). In my case, it was default_web_client_id that are missing in 4.3.10, but it was there in 4.3.8. I knew the 4.3.10 was released to fix the issue where 4.3.9 where the entire values.xml file was not not generated while building the project, but I just wanted to point this out.

From the project view in 4.3.8, I am able to see this file like this, and there is no issue in this version.
image
image

But in the project view of 4.3.10, I am getting something like this here, and default_web_client_id in the code is getting "Unresolved reference" as the screenshot below.
image
image

*Ps. the one highlighted in yellow is "Non-project files", if that helps
image

  • I am reverting back to 4.3.8 for now

Do let me know if there is anything wrong on my side/ if I misunderstood something. Thanks!

@AndreasBoehm
Copy link

When i use 4.3.10 I am randomly missing the generated values.xml that should be generated by the google-services-plugin.

@jeremie-l
Copy link

jeremie-l commented Sep 12, 2022

I am still having the issue with version 4.3.10, each time, when the app/build directory is cleared first.
However latest 4.3.13 works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants