[External] Firebase use JobInfoSchedulerService that cause Auto-Restart Crash Loop

290 views
Skip to first unread message

Minh Van Nguyen

unread,
Nov 27, 2024, 10:51:36 AM11/27/24
to Firebase Google Group
Hi, teams. Do any of you happen to have such an issue below?

Issue Summary

We identified a critical crash pattern in Firebase Crashlytics reports, where a small subset of users experienced an unusually high repeated crash. All crashes occur during the application creation.

Screenshot 2024-11-27 at 4.44.24 PM.png

Those crashes happen because of device-specific issues (incompatible Google Play Service or corruption), which are impossible to fix. We would like to resolve the relaunching loop.


Investigation 

Observations

  • Small number of affected users
  • Extremely high crash frequency per affected user
  • All crashes consistently occurred during app launch
  • Crashes showed a pattern of immediate app relaunch

Reproduction Steps

To investigate the issue, we:

  1. Create a demo app and include Firebase Crashlytics & Firebase Analytics
  2. Simulated a crash during app launch
  3. Observed the following pattern:
    • App crash during launch
    • Automatic relaunch
    • Immediate subsequent crash
    • Pattern repeated indefinitely
    • Most of the time, I could see the app crash and relaunch three times in a round until the OS "[Your app] Keeps stopping" dialog appeared. There are cases it keeps crashing & auto relaunching 20+ times continually (the "[Your app] Keeps stopping"  is not showed)

Root Cause

The investigation revealed that:

While the app crashes during app launch, it is scheduled to re-launch the JobInfoSchedulerService after a period, and Firebase used it.

--------

ActivityManager     Scheduling restart of crashed service com.example.background/com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService in 1000ms for connection 

--------

I understand that JobInfoSchedulerService is a JobService, which is expected to behave as a JobService. If a JobService hasn't completed its work (returns false from onStopJob()), the system will automatically reschedule the job for later.

Since crashes happen during Application creation, any scheduled jobs, broadcast receivers, or push notifications might trigger this crash loop. 

I am wondering if we can prevent these loops.






By communicating with Grab Holdings Limited and/or its subsidiaries, associate companies and jointly controlled entities (collectively, “Grab”), you are deemed to have consented to the processing of your personal data as set out in the Privacy Notice which can be viewed at https://grab.com/privacy/ 

 This email contains confidential information that may be privileged and is only for the intended recipient(s). If you are not the intended recipient(s), please do not disseminate, distribute or copy this email. Please notify Grab immediately if you have received this by mistake and delete this email from your system. Email transmission may not be secure or error-free as any information could be intercepted, corrupted, lost, destroyed, delayed or incomplete, or contain viruses. Grab does not accept liability for any errors or omissions in this email that arise as a result of email transmission. All intellectual property rights in this email and any attachments shall remain vested in Grab, unless otherwise provided by law
Reply all
Reply to author
Forward
0 new messages