Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException in JobIntentService on Android 8.1 #649

Closed
mvisionapps opened this issue Oct 13, 2018 · 7 comments
Closed

Comments

@mvisionapps
Copy link

mvisionapps commented Oct 13, 2018

I updated my app to use SDK 3.10.2. I'm seeing some issues on Android 8.1 and 8.0 on different devices with the following exception

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3208)
  at android.app.ActivityThread.-wrap17 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1684)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:172)
  at android.app.ActivityThread.main (ActivityThread.java:6590)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)
Caused by: java.lang.IllegalStateException: 
  at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1521)
  at android.app.ContextImpl.startService (ContextImpl.java:1477)
  at android.content.ContextWrapper.startService (ContextWrapper.java:650)
  at com.onesignal.JobIntentService$CompatWorkEnqueuer.enqueueWork (JobIntentService.java:204)
  at com.onesignal.JobIntentService.enqueueWork (JobIntentService.java:534)
  at com.onesignal.q.a (NotificationBundleProcessor.java:465)
  at com.onesignal.q.a (NotificationBundleProcessor.java:430)
  at com.onesignal.GcmBroadcastReceiver.a (GcmBroadcastReceiver.java:125)
  at com.onesignal.GcmBroadcastReceiver.onReceive (GcmBroadcastReceiver.java:72)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3201)

Already included these line in manifest

<service
   android:name=".util.NotificationExtender"
   android:permission="android.permission.BIND_JOB_SERVICE"
   android:exported="false">
   <intent-filter>
       <action android:name="com.onesignal.NotificationExtender" />
   </intent-filter>
</service>

@jkasten2

@jkasten2
Copy link
Member

@mvisionapps Thanks for the stacktrace, are you able to reproduce this issue on your own devices? Or only reports from the Google Play Console? If you can reproduce the issue on your own devices there should be a more detailed message just after java.lang.RuntimeException: that would be helpful.

If you can reproduce the issue can you let us know which device models are being reported as crashing?

Thanks.

@jkasten2
Copy link
Member

@mvisionapps Thanks for the details on you posted in #482 (comment). I believe this is similar to issue #498 where the app isn't staying temporally whitelisted for doze by FCM when you sending with high priority.

We will need to add the same handling for those using the notification extension service it was only applied to the normal build in OneSignal service to handle the payload.

@mvisionapps
Copy link
Author

@jkasten2 Should we wait for next update or Is there any fix for the issue? I cannot find any solution in the referenced issue #498

@bhaveshrangani
Copy link

Same issue after i updated to 3.10.2. have you found any solution?

@gsksarath
Copy link

gsksarath commented Nov 1, 2018

Me too getting same Exception in Play Store for Android Oreo 8.0 & 8.1 Devices after i updated to 3.10.2.

@gsksarath
Copy link

gsksarath commented Nov 2, 2018

@jkasten2 if i downgraded the OneSignal to 3.10.1 will fix this issue?

@jkasten2
Copy link
Member

jkasten2 commented Nov 2, 2018

@gsksarath Sorry for the delay, we just released version 3.10.3 with a fix for this. It will take maven central a few hours to sync the update so you might not see it right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants