Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JobIntentService crashing in above Android O (8) and above after targeting api 26

I had changed target to API 27 (Android O) and migrated IntentService to JobIntentService after that It started crash in some devices on Android O(8) and above.

Here is crash log.

Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground()
   at android.os.AsyncTask$3.done(AsyncTask.java:353)
   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:1162)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
   at java.lang.Thread.run(Thread.java:764)
Caused by java.lang.SecurityException: Caller no longer running, last stopped +2s213ms because: timed out while starting
   at android.os.Parcel.readException(Parcel.java:1943)
   at android.os.Parcel.readException(Parcel.java:1889)
   at android.app.job.IJobCallback$Stub$Proxy.dequeueWork(IJobCallback.java:191)
   at android.app.job.JobParameters.dequeueWork(JobParameters.java:196)
   at android.support.v4.app.JobIntentService$JobServiceEngineImpl.dequeueWork(SourceFile:314)
   at android.support.v4.app.JobIntentService.dequeueWork(SourceFile:639)
   at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground$10299ca(SourceFile:2389)
   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:1162)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
   at java.lang.Thread.run(Thread.java:764)
like image 338
Ashish Kumar Maurya Avatar asked Aug 03 '18 06:08

Ashish Kumar Maurya


1 Answers

Read here: https://issuetracker.google.com/issues/63622293 it seems te bo Google bug

like image 63
user1209216 Avatar answered Nov 09 '22 23:11

user1209216