-
Notifications
You must be signed in to change notification settings - Fork 602
IllegalStateException in FirebaseInstanceId #1528
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
Comments
I found a few problems with this issue:
|
@quibi-jlk For some reason, other than you only @hetang reported a similar issue. Apparently we have a regression of #1339 (or #1355 did not fix all scenarios). |
@quibi-jlk 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 You can lock
|
Thanks so much for the quick response and action on this @andirayo! I'll try to check out whether there are any problems with downgrading our deps. If there are, I think waiting until May 21st wouldn't be the end of the world on our end. Just to be clear, when you say |
@quibi-jlk are you able to provide the dependencies graph for us?
|
@quibi-jlk : Q2) Do you happen to have more extensive logs for the crash (background: we are trying to reproduce the issue locally)? |
FYI: Another dev reported this with the exact same stacktraces and line numbers in |
Hi folks, sorry for the delay, I've been pulled away to some other high-priority work. Here are answers to these questions: Q1 (deps) - Here are our firebase-relevant deps:
Q2) Unfortunately we have no local repro, so we only have what crashlytics gives us here, which is this stack trace. Q3) We don't see any correlation by device type, sdk version, etc. However, we do see that 97% of the crashes are while the app is in the background (usually right after starting up a background sync job). We also see this log in about 50% of the reports:
This might be a red herring, but it's interesting to me that many of these are running an old gmscore apk. |
@quibi-jlk can you please paste the stack trace of all threads as seen in crashlytics? |
Attaching file with all 40 threads @ankitaj224 |
@ankitaj224 it's interesting that none of the threads are blocked on the FileLock, in fact the thread pool is just empty waiting for tasks. Could it be the case that the getId() task completion source just does not get completed for some reason? Another strange fact is that there appear to be 2 threads in the |
I'm also having this issue. These are my dependencies regarding Firebase
Q2) This is all the stack trace I could get from Firebase Crashlytics : https://pastebin.com/UMkjvpZV Q3) 92% crash happens while app is in background. For firebase-core, which version would you recommend to use? |
Also have this issue - 33 unique events reported so far. The stack trace is:
The dependencies are:
|
@ankitaj224 do you have any updates here? |
Another issue similar to this #1494 . |
@quibi-jlk Sorry for the delayed response. I have few pending changes and should be able to release fix as part of v16.4.0 of FirebaseInstallations (and FirebaseMessaging v20.2.1) on June 18, 2020. I ll keep this thread posted on the updates. |
@quibi-jlk : We have some ideas around what might be causing the issue but we couldn't successfully identify the root cause. Can you please help me with these details pertaining to your app? This will help me narrow down & mimic the app setup running into this issue. Does your have multiple processes? |
Thanks @ankitaj224. No to both questions, just one process and one firebase project. |
@quibi-jlk Did you / other reporters notice any pattern about this issue happening only in specific Android Versions or devices? |
As far as I can tell, it seems fairly aligned with our overall distribution in terms of manufacturer, os version, etc. |
For mine, got multiple projects. But for my app, the last crash was on 4th June 2020. |
@fangor16 Thanks for the stats. Do you have a bug report for the recent crashes from Google Play that we can take a look at? |
@ankitaj224 My project also getting the same crash after the latest update These are my dependencies
Stack trace From Crashlytics
|
@Vaisakhk Thanks for reporting the issue and providing device/os stats. Do you have any context or bug reports for this crash? Or if you can paste the stack trace of all threads as seen in crashlytics, it would be helpful. This crash could occur due to multiple reasons. As seen from @quibi-jlk stack trace : firebase_installations threads being stalled due to CPU load, eventually resulting in timeout and causing this crash. I was able to reproduce this particular case. Other stack traces related to the same issue will help us identify if thread starvation is the main root cause for this crash. |
@ankitaj224 given that a majority of these crashes are with the app in the background, I wonder if doze mode has something to do with this. Perhaps some background job isn't grabbing a wake lock during a maintenance window or something? |
@quibi-jlk That sounds like a possibility. Thanks for the suggestion 👍 , I ll test my app in Doze and Standby mode to see if I can reproduce this crash. I will keep you posted on how that test goes. |
@ankitaj224 Any update on this issue? In our app this crash occures when Firebase getId() method is called from background thread, exactly when sync is called using Android accounts and auto sync feature. The app activity is not visible and app process is not started.
|
@szymone Thanks for reaching out. The stack trace you pasted doesn't look related to the IllegalStateException. I would request you to report a new issue and we can track what's going on in that issue. |
Very sorry for slow response. I was caught up with other high priority tasks. Based on our earlier discussion, I tested the app in doze & standby mode and that doesn't seem to be an issue. The However, I was able to reproduce this issue due to thread starvation. Are you/other developers reporting this crash are explicitly calling The answer to the above question will help confirm my theory: In an app usually when Fireperf is enabled; As most of the stack traces are when Fireperf is releasing a new version on July 16, 2020. I will update this thread once the new version is out. Thanks for your patience on this issue. |
Thanks, @ankitaj224, that's a super interesting theory and sounds plausible to me! We don't call |
@fangor16 Though the stack trace you reported looks the same, the cause is different. Also, you are transitively using older version of Please try updating to the newer versions of perf, crashlytics and firebase-analytics and let us know if you are continuing to see the issue. Thank you. |
@ankitaj224 There are two threads, please check below.
|
@szymone The stack trace you posted doesn't seem related to this particular git issue. I would recommend reporting a new git issue. You can assign it to me and I will forward it to the right team. FWIW, I did check the stack trace you linked with the Thanks. |
@ankitaj224 Thanks for checking this out. Currently I'm not seeing this crash any more and it'd be hard to debug, so I won't report this for now. Thanks once again. |
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. |
@quibi-jlk, @Vaisakhk : Have you tried updating to the latest version of Fireperf? Please drop a note if the issue persists. |
Hey @quibi-jlk. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Hi @ankitaj224 thanks for the update! I haven't had a chance to try it out yet, but I'll get this update in our next release and try to collect some fresh data. |
Please poke back/create a new issue if you continue seeing problems. Closing for now |
[REQUIRED] Step 2: Describe your environment
We have direct deps on:
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:
This is currently by far our largest open crash cluster
It is very similar to #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
The text was updated successfully, but these errors were encountered: