Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

450
Views
java.lang.IllegalStateException: FirebaseApp was deleted

lastly I'm struggling with Android Crashes from firebase. We are using unity latest version:

  • Firebase App (v7.1.0)
  • Firebase Auth (v7.1.0)
  • Firebase Crashlytics (v7.1.0)
  • Firebase Remote Config (v7.1.0)
  • Google Analytics for Firebase (v7.1.0).

We initialize it with the options:

Application = firebaseOptions != null ? FirebaseApp.Create(firebaseOptions) : FirebaseApp.DefaultInstance;

Normally the game is working correctly, firebase implementation looks good, events are getting captured etc. Unfortunately, we have a lot of crashes with stacktrace:

Did anyone have the same issue? How to resolve it? We can't reproduce the issue, We even don't know how does it happen at all, as stack trace is running clearly right from the Google team code.

I assume it's a work that is checking if the app wasn't removed from the phone.

Fatal Exception: java.lang.IllegalStateException: FirebaseApp was deleted
       at com.google.android.gms.common.internal.Preconditions.checkState(com.google.android.gms:play-services-basement@@17.6.0:2)
       at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:439)
       at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:126)
       at com.google.firebase.installations.FirebaseInstallations.insertOrUpdatePrefs(FirebaseInstallations.java:444)
       at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:401)
       at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:377)
       at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(:4)
       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)```
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I've managed to resolve an issue.

First of all, it was the problem of overriding DefaultInstance of the firebase app. more you can find here: Firebase issue

And here is how can you resolve it, links were provided to me by firebase support. At the moment we are preventing auto initialization of the app, and at runtime, we create a fresh firebase app, it's the first thing we do in the launcher.

https://firebase.googleblog.com/2017/03/take-control-of-your-firebase-init-on.html

You can also learn more about firebase initialization process here: https://firebase.googleblog.com/2016/12/how-does-firebase-initialize-on-android.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!