Skip to content

SecurityException: Caller no longer running, last stopped v2 #194

Closed
@rykugur

Description

@rykugur

This is a continuation of this issue: #166

We're seeing the same crash and stacktrace after implementing the intent filter in code.

Stacktrace:

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 +6s841ms because: timed out while starting
       at android.os.Parcel.readException(Parcel.java:1958)
       at android.os.Parcel.readException(Parcel.java:1904)
       at android.app.job.IJobCallback$Stub$Proxy.dequeueWork(IJobCallback.java:191)
       at android.app.job.JobParameters.dequeueWork(JobParameters.java:196)
       at com.optimizely.ab.android.shared.JobWorkService$CommandProcessor.doInBackground(JobWorkService.java:73)
       at com.optimizely.ab.android.shared.JobWorkService$CommandProcessor.doInBackground(JobWorkService.java:56)
       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)

Snippet of our intent-filter in our Application.onCreate() method:

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
      EventRescheduler rescheduler = new EventRescheduler();
      registerReceiver(rescheduler, new IntentFilter(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION));
    }

99% of our crashes are happening on Android O, with a large number of those users on Samsung devices (but this doesn't seem to be a Samsung-only issue, there are also a fair number of HTC, LG, Google, etc. devices)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions