Fixed
Status Update
Comments
su...@google.com <su...@google.com> #2
Hello,
We recently launched an update that includes "androidx.work:work-runtime:2.0.1", and we used it to schedule all our tasks now, in a satisfactory way. I just want to inform, (as you can see in the images attached below), that this problem keeps happening sporadically.
Keep in mind that the number of users affected in our case is small, since the app has several million active users, but it also starts to be worrisome, since the number of errors generated by each user is high.
The errors mainly occur in Android 6 and 7, and sometimes in 8, but especially in Android 7.
I do not expose implementation details, since the documentation of this SDK has been thoroughly studied, and in case there was a bad implementation, the number of errors would be infinitely greater.
Greetings.
PD: If you need any information that I can provide you, you just have to ask me.
We recently launched an update that includes "androidx.work:work-runtime:2.0.1", and we used it to schedule all our tasks now, in a satisfactory way. I just want to inform, (as you can see in the images attached below), that this problem keeps happening sporadically.
Keep in mind that the number of users affected in our case is small, since the app has several million active users, but it also starts to be worrisome, since the number of errors generated by each user is high.
The errors mainly occur in Android 6 and 7, and sometimes in 8, but especially in Android 7.
I do not expose implementation details, since the documentation of this SDK has been thoroughly studied, and in case there was a bad implementation, the number of errors would be infinitely greater.
Greetings.
PD: If you need any information that I can provide you, you just have to ask me.
ku...@gmail.com <ku...@gmail.com> #3
Thanks for re-uploading the screenshots.
A couple of questions:
* Can you reproduce this issue at all on your end ? If so, can you send us all WorkManager logs after turning on logging. For this you will have to use custom initialization and use Log.DEBUG. For more information look athttps://developer.android.com/topic/libraries/architecture/workmanager/advanced/custom-configuration
* Can you send us a breakdown of devices and total # of users affected ? The number of crashes will be dis proportionally high because once the app gets into this state - its hard to get out of it.
A couple of questions:
* Can you reproduce this issue at all on your end ? If so, can you send us all WorkManager logs after turning on logging. For this you will have to use custom initialization and use Log.DEBUG. For more information look at
* Can you send us a breakdown of devices and total # of users affected ? The number of crashes will be dis proportionally high because once the app gets into this state - its hard to get out of it.
su...@google.com <su...@google.com> #4
Also from the first screenshot, it looks like you are also seeing IllegalStateException's in SystemJobService#onCreate().
The only reason that happens is if WorkManager is not been initialized for your process. Do you have multiple processes at all ?
The only reason that happens is if WorkManager is not been initialized for your process. Do you have multiple processes at all ?
yb...@google.com <yb...@google.com> #5
Are you initializing WorkManager on a background thread or inside a coroutine ?
ia...@gmail.com <ia...@gmail.com> #6
We're seeing this crash with WorkManager 1.0.1 on Android 7, 8 and 9. The interesting bit for us is that we released an urgent hot fix where we removed the use of WorkManager entirely but the crashe still happens. The best hypothesis I could come up is that the OS Scheduler is keeping this bad job running even after the update.
We didn't schedule the job in a coroutine nor in the background. We did in the Application.onCreate() and we always try to clean up the jobs for the predefined tag.
Seeing that this problem is still happening with WorkManager 2.0.1 is worrisome. Is there any advice and/or workaround for anyone in this situation?
We didn't schedule the job in a coroutine nor in the background. We did in the Application.onCreate() and we always try to clean up the jobs for the predefined tag.
Seeing that this problem is still happening with WorkManager 2.0.1 is worrisome. Is there any advice and/or workaround for anyone in this situation?
yb...@google.com <yb...@google.com> #7
Please send us logs for your crashes. They are super useful especially given you are seeing them on Android 8, 9.
To work around this issue for now you should probably do ahttps://developer.android.com/reference/android/app/job/JobScheduler.html#cancelAll() for now (inside Application.onCreate()).
Jobs don't really go away after an application update. So this step is important.
To work around this issue for now you should probably do a
Jobs don't really go away after an application update. So this step is important.
da...@google.com <da...@google.com> #8
Also information about no of users affected will be useful (and %s). The number of crashes are going to be disproportionally high - so that is not a very useful number. That's because once a device gets into this state - it's hard to recover.
Description
It is preferable to have a destructive migration to crashing the app.