Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: android.arch.work:work-runtime:1.0.0-alpha06
Devices/Android versions reproduced on: 7.1.1 and 7.1.2
I don't know the steps to reproduce this issue.
Here's the crash stacktrace I'm getting on crashlytics-
Fatal Exception: java.lang.IllegalStateException: Apps may not schedule more than 100 distinct jobs
at android.os.Parcel.readException(Parcel.java:1692)
at android.os.Parcel.readException(Parcel.java:1637)
at android.app.job.IJobScheduler$Stub$Proxy.schedule(IJobScheduler.java:158)
at android.app.JobSchedulerImpl.schedule(JobSchedulerImpl.java:42)
at androidx.work.impl.background.systemjob.SystemJobScheduler.scheduleInternal(SystemJobScheduler.java:126)
at androidx.work.impl.background.systemjob.SystemJobScheduler.schedule(SystemJobScheduler.java:95)
at androidx.work.impl.Schedulers.schedule(Schedulers.java:99)
at androidx.work.impl.utils.EnqueueRunnable.scheduleWorkInBackground(EnqueueRunnable.java:114)
at androidx.work.impl.utils.EnqueueRunnable.run(EnqueueRunnable.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Crash occurs on version alpha04 and alpha05 as well.
I have only one work which is enqueued like this-
OneTimeWorkRequest.Builder requestBuilder = new OneTimeWorkRequest.Builder(SOMETHING.class);
requestBuilder.setInitialDelay(SOME_DELAY, TimeUnit.SECONDS);
OneTimeWorkRequest request = requestBuilder.build();
workManager.beginUniqueWork(WORK_TAG, ExistingWorkPolicy.REPLACE, request).enqueue();
doWork always returns Result.SUCCESS but uses the above code to enqueue future work sometimes.
Since this is a unique work request with replace policy, how come there 100 scheduled jobs?
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
I don't know what triggers this crash. I have given the relevant code above.
- A screenrecord or screenshots showing the issue (if UI related).
NA