-
Notifications
You must be signed in to change notification settings - Fork 615
Firelog sdk is using JobScheduler which is not recommended now #6147
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
This is being worked on along with other improvements for API level 34 (android 14), and it should be rolled out across all Firebase Android SDKs soon. |
@davidmotson Is there any schedule or planned date for next Firebase Android BOM release which includes these fixes? These ANR's are becoming critical now for our app. |
@davidmotson @mrober Does this issue got fixed in BOM version 33.2.0? |
Is there any timeline when the fix for this will be released? |
Relates to
|
Is this Fixed The background ANR coming on Android 14? |
@stepushchik @RelappsStudio @mandeep1999 Can you provide more details on the error you're experiencing? For example: Are there other, similar ANRs being reported for your app? (same error, binder transaction, but a different stack trace) |
Hi @davidmotson Any Update on this: #6264 And let us know if there are any temporary solutions for this. |
Hi folks! sharing this update here from the original issue (#4345). From mrober:
|
Any update on the above |
Hi Team, we are facing this same issue, ie on Android 14 & numbers are in millions. |
Hi Team, This issue has become our top ANR and it is mostly happening for Android 14 Oppo Devices. ![]() ![]() @mrober Could you please share an expected ETA about the fix if possible? |
when ANR will be solved ? |
Unfortunately, ANRs still present after updating to Please check in your project if you can. |
@stepushchik Fix for Android 14 specific ANR's is not a part of 19.2.0, according to this, so we have to wait. |
Folks do we have ETA for the fix? Will this be fixed on the Firebase libraries? |
After some investigation here are the results:
|
@davidmotson While the user experience might not be visibly affected, Google Play will penalize the apps with excessive crash rates, which this issue significantly contributes to. I believe it should not be closed, but fixed instead. |
According to this only user perceived ANRs should penalize your app. |
this should be fix otherwise it will create performance issue on play console |
Hi @davidmotson, Unfortunately a significant number of this issue is user perceived ANR. Please check the screenshot from Google Play Console below. This screenshot clearly indicates that there are significant number of user perceived ANRs from this issue. Having this issue happening before Android 14 but not being reported should not be a reason for closing the issue. I think our take should be the opposite. Since the issue is identified and has clear affect on the users, we should plan to fix it. There are 14 down votes to the message for the decision of not fixing the issue. This clearly shows that there is a clear frustration from this ANR for several products/teams. For our 9 applications on Google Play with millions of users, this ANR is always in top 3 in Google Play user perceived ANRs. Could you please reassess the issue and open it again? ![]() |
@davidmotson Finding this rationale very odd - given the experience of the users will get impacted. Cold start/warm starts will be high and is not a good experience. I am not just worried about the metric, penalty and indirect cost in loss of user base - I am worried about the experience it has on end users. Open to brainstorm ideas for a fix. Could you give more details on the challenges? |
Hi @davidmotson I carefully read the information provided by @hakanbagci, I also encountered this problem, and it is TOP 2 |
Same stuff |
@hakanbagci This would definitely be new information. Can you provide more details? @JonathanKranz |
@davidmotson @lehcar09 @mrober , yesterday Firebase BOM - 33.5.0 is released that also includes crashlytics NDK version 19.2.1. Does this release contains fix for Android 14 ANR's as mentioned in above comment ? |
Hi @davidmotson, After some more investigation I found out that the main thread is blocked because Hypothesis: Large data operations or complex object serialization within Shared Preferences can lead to significant processing time on the main thread, especially when Following this hypothesis maybe we can ask the question: Does Firelog or Firebase Crashlytics rely heavily on Shared Preferences for internal operations, such as caching log data or crash reports? Could their internal usage patterns be contributing to the ANR occurrences? ![]() |
@hakanbagci Thank you for you response. I don't think anything in this strack trace points to something in firebase being an issue. Firelog and Crashlytics don't use SharedPreferences in a heavyweight way. Our code is also open sourced, so if you want to use that to verify assumptions or otherwise assist your debugging process definitely feel free to do so. Regardless, it seems to have nothing to do with JobScheduler, so if you find more info on this please open another issue. @ankit92 |
Opened a new issue for firebase performance. It looks like this issue (at least the issue that I shared the stack trace) is most probably related to Please check if this is the case for you as well. |
this is perceptible ANR in GP, there are two cases that use JobScheduler: 1)com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoScheduler Firebase should do something instead of close this issue @davidmotson |
Uh oh!
There was an error while loading. Please reload this page.
From @ankit92:
com.google.android.datatransport/transport-runtime library is using JobScheduler which is not recommended now as mentioned in android documentation: https://developer.android.com/about/versions/14/behavior-changes-14
_JobScheduler reinforces callback and network behavior
Since its introduction, JobScheduler expects your app to return from onStartJob or onStopJob within a few seconds. Prior to Android 14, if a job runs too long, it stops and fails silently. If your app targets Android 14 (API level 34) or higher and exceeds the granted time on the main thread, the app triggers an ANR with the error message "No response to onStartJob" or "No response to onStopJob". Consider migrating to WorkManager, which provides support for asynchronous processing or migrating any heavy work into a background thread._
All ANR's which spiked in our app are on Android 14 , as mentioned in above chat threads, and mostly related JobScheduler.
Strangely 75% of events are on OnePlus devices and rest 25% are on OPPO devices
Here are the logs:
art::ConditionVariable::WaitHoldingLocks
ANR triggered by thread waiting for a binder transaction
main (native)
tid=1 systid=30996
Triggered ANR
Root blocking
0
libc.so
syscall + 28
1
libart.so
art::ConditionVariable::WaitHoldingLocks + 140
2
libart.so
artJniMethodEnd + 336
3
libart.so
art_jni_method_end + 12
android.os.BinderProxy.transactNative (Native method)
This Binder call may be taking too long, causing the main thread to wait, and triggering the ANR.
android.os.BinderProxy.transact (BinderProxy.java:685)
android.app.job.IJobCallback$Stub$Proxy.acknowledgeStartMessage (IJobCallback.java:434)
android.app.job.JobServiceEngine$JobHandler.ackStartMessage (JobServiceEngine.java:384)
android.app.job.JobServiceEngine$JobHandler.handleMessage (JobServiceEngine.java:196)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loopOnce (Looper.java:257)
android.os.Looper.loop (Looper.java:368)
android.app.ActivityThread.main (ActivityThread.java:8839)
java.lang.reflect.Method.invoke (Native method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:572)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1049)
This is becoming more critical now and shaken all our app's performance metrics in terms of ANR's
Raised this to help you so that you can get more insights and request you to please provide us with the fix as soon as possible .
Thanks
Originally posted by @ankit92 in #4345 (comment)
The text was updated successfully, but these errors were encountered: