IllegalStateException in FirebaseInstanceId
See original GitHub issue[REQUIRED] Step 2: Describe your environment
- Android Studio version: Tried on both 3.6.3 and 4.0.0-beta05
- Firebase Component: Firebase IID (via messaging or installations
- Component version: We have direct deps on:
FIREBASE_ANALYTICS = "17.3.0"
FIREBASE_MESSAGING = "20.1.5"
FIREBASE_PERF = "19.0.6"
FIREBASE_CRASHLYTICS = "17.0.0-beta04"
Firebase installations resolves to 16.2.1
[REQUIRED] Step 3: Describe the problem
We have a significant number of crash reports in crashlytics with this obfuscated stack trace:
Fatal Exception: java.lang.IllegalStateException
at com.google.firebase.iid.FirebaseInstanceId.zzl(FirebaseInstanceId.java:70)
at com.google.firebase.iid.FirebaseInstanceId.getId(FirebaseInstanceId.java:48)
at com.google.firebase.perf.internal.zzf.zzbv(zzf.java:181)
at com.google.firebase.perf.internal.zzf.zzbu(zzf.java:44)
at com.google.firebase.perf.internal.zzf.zzc(zzf.java:195)
at com.google.firebase.perf.internal.zze.run(zze.java:2)
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)
This is currently by far our largest open crash cluster
It is very similar to https://github.com/firebase/firebase-android-sdk/issues/1339#, but I was advised by @TKBurner to create a new ticket since that was was marked closed in an older sdk version. I’m happy to provide any additional data that might help here.
Steps to reproduce:
We don’t have a local repro for this issue, but it’s certainly affecting people in the wild.
cc @andirayo who worked on the original issue
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:39 (23 by maintainers)
Top Results From Across the Web
Firebase Cloud Messaging -> Illegal State Exception in Android
However I am getting a Illegal State Exception at Line 49: FirebaseMessaging. ... FirebaseInstanceId.getInstance(Unknown Source) at ...
Read more >FirebaseInstanceID breaking multi-process apps on Android?
When run in an external process, the service will never be called, and getInstance() throws an exception: java.lang.IllegalStateException: FirebaseApp with name ...
Read more >com.microsoft.appcenter.push.Push.isEnabled java code examples ...
@Test public void registerWithoutFirebaseOrSenderId() { IllegalStateException exception = new IllegalStateException(); when(FirebaseInstanceId.
Read more >FirebaseInstanceId.Instance.Token returning null - MSDN
In My app, I am trying to get FirebaseInstanceId.Instance. ... IllegalStateException: Default FirebaseApp is not initialized in this process ...
Read more >java.lang.IllegalStateException: Default FirebaseApp is ... - B4X
FirebaseInstanceId.getInstance(Unknown Source) at com.google.firebase.messaging.FirebaseMessaging.getInstance(Unknown Source) at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@quibi-jlk We will immediately be looking into this, but we cannot promise you any timeline. The next scheduled release will be
FirebaseInstanceId
(andFirebaseMessaging
)v20.1.8
, scheduled for May 21, 2020.Thus, if this is an urgent issue for you, I recommend you to downgrade to versions of Firebase SDKs before the introduction of the infrastructure service
FirebaseInstallations
:You can lock
FirebaseInstanceId
tov20.0.2
or use older versions of Firebase SDKs (which should have the same effect):FirebaseMessaging
<v20.1.1
Analytics
<17.4.0
FirePerf
<19.0.7
Crashlytics
<17.0.0
For developers impacted by this issue, please try & update to the latest version of Fireperf - 19.0.8 released on July 17, 2020. The latest version contains a possible fix to the IllegalStateException.
Also, please report your findings on this issue after the Fireperf update.