Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SecurityException: Caller no longer running, last stopped

Description:

We have been observing this crash on our fire base console for the users which have android 8 (Oreo) + devices. Stack trace shows that its your internal method which is causing this fatal exception.

Environment And Device Details

Device Info:

  • Devices: samsung, HUAWEI, HMD Global, Xiomi, others
  • OS version: Android 8.0 (Oreo), Android 9.0 (Pie)
  • Crash Percentage: Android 8.0 (99%), Android 9.0 (1%)

OneSignal SDK Version:

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/'}
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'
    }
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

dependencies {

 implementation('com.onesignal:OneSignal:[3.9.1, 3.99.99)') {
        exclude group: 'com.google.android.gms'
    }

}

Stack trace Information

Caused by java.lang.SecurityException: Caller no longer running, last stopped +2s26ms because: timed out while starting
       at android.os.Parcel.readException(Parcel.java:1959)
       at android.os.Parcel.readException(Parcel.java:1905)
       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(SourceFile:389)
       at android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(SourceFile:382)
       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)

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)

If you need more information do let me know.

like image 899
Fazal Hussain Avatar asked Oct 01 '18 06:10

Fazal Hussain


1 Answers

This is only a problem when proguard is enabled. OneSignal working successfully on Adnroid 8.0 and 8.1 by adding this to my proguard rules;

-keep class com.onesignal.JobIntentService$* {*;}
like image 65
Hoshouns Avatar answered Oct 23 '22 23:10

Hoshouns