8

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.

Fazal Hussain
  • 1,129
  • 12
  • 28
  • 1
    This is a known issue occurring across all devices with android 8.0+ . I believe this has to do something with job service. Take a look at this maybe it will help you in some way. https://github.com/evernote/android-job/issues/255 https://issuetracker.google.com/issues/63622293 – Umair Oct 01 '18 at 06:13
  • Thanks for your response. I am using one signal SDK which is using job service how to resolve the issue because the issue with the library – Fazal Hussain Oct 01 '18 at 06:25
  • 1
    If the issue is with library then you have two ways to resolve it. Either find a work around for that specific class or find another library. If you can fork that library get access to those classes and then change the code. Otherwise you will have to wait for the issue to be resolved ;). – Umair Oct 01 '18 at 06:28
  • @FazalHussain Any solution? – Royz Jan 20 '20 at 08:47
  • I didn't find any solution if anyone finds it let me know – Fazal Hussain Jan 20 '20 at 09:03

1 Answers1

1

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$* {*;}
Hoshouns
  • 2,420
  • 23
  • 24