2

I have been working with WorkManager in my app. I am not sure but my app's process gets killed after the below excepion.

java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:354)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
    at java.util.concurrent.FutureTask.run(FutureTask.java:271)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)
 Caused by: java.lang.IllegalArgumentException: Given work is not active: JobWorkItem{id=1 intent=Intent {  } dcount=1}
    at android.app.job.JobParameters.completeWork(JobParameters.java:268)
    at androidx.core.app.d$f$a.b(Unknown Source:17)
    at androidx.core.app.d$a.a(Unknown Source:17)
    at androidx.core.app.d$a.doInBackground(Unknown Source:2)
    at android.os.AsyncTask$2.call(AsyncTask.java:333)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
    at java.lang.Thread.run(Thread.java:764)

I have also gone through one of the similar posts : Getting crash on JobIntentService onComplete And i have made sure that JOB_ID is unique for my JobService.

Another point here is that i am not sure if it is a due to JobService or WorkManager as i am using both in my app.

The workManager version i am using is : 1.0.0-rc01 Please help me to trace down the exact issue.

Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
anshul
  • 982
  • 1
  • 11
  • 33

0 Answers0