Skip to content

ANRs after targeting to Anroid 14 - JobInfoSchedulerService.onStartJob #6166

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

Closed
WaterResistantCoder opened this issue Aug 8, 2024 · 2 comments

Comments

@WaterResistantCoder
Copy link

WaterResistantCoder commented Aug 8, 2024

Hi, our apps ANRs were shot up by double after targeting to Android 14, almost half of them are from
com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService.onStartJob

ANR triggered by slow operations in main thread
100% Android 14 & 100% Background

Stack Trace:
main (runnable):tid=1 systid=24957
at com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService.onStartJob(JobInfoSchedulerService.java:32)
at android.app.job.JobService$1.onStartJob(JobService.java:106)
at android.app.job.JobServiceEngine$JobHandler.handleMessage(JobServiceEngine.java:195)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:368)
at android.app.ActivityThread.main(ActivityThread.java:8839)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

Firebase BOM: 32.1.1

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@lehcar09
Copy link
Contributor

lehcar09 commented Aug 9, 2024

Hi @WaterResistantCoder, thank you for reaching out. This is similar to issue #6147.

As mentioned in the description,

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

Our engineers are already working on this along with other improvements for API level 34 (android 14), and it should be rolled out across all Firebase Android SDKs soon.

To streamline the updates, you can follow on the issue #6147. With that, I'll be closing this issue now. Thanks.

@lehcar09 lehcar09 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2024
@firebase firebase locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants