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

Crash OneSignalSyncServiceUtils IllegalArgumentException #616

Closed
danlex-corp opened this issue Aug 27, 2018 · 4 comments
Closed

Crash OneSignalSyncServiceUtils IllegalArgumentException #616

danlex-corp opened this issue Aug 27, 2018 · 4 comments

Comments

@danlex-corp
Copy link

Hi, I am got a lot of this crash in Google Play Console:

java.lang.IllegalArgumentException: 
  at android.os.Parcel.readException (Parcel.java:1687)
  at android.os.Parcel.readException (Parcel.java:1636)
  at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:158)
  at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:42)
  at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncServiceAsJob 
    (OneSignalSyncServiceUtils.java:137)
  at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncTask (OneSignalSyncServiceUtils.java:113)
  at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncTask (OneSignalSyncServiceUtils.java:60)
  at com.onesignal.OneSignal.onAppLostFocus (OneSignal.java:1089)
  at com.onesignal.ActivityLifecycleHandler$AppFocusRunnable.run (ActivityLifecycleHandler.java:171)
  at android.os.Handler.handleCallback (Handler.java:836)
  at android.os.Handler.dispatchMessage (Handler.java:103)
  at android.os.Looper.loop (Looper.java:203)
  at android.os.HandlerThread.run (HandlerThread.java:61)

on Android 7.0 and Adnroid 5.0.
Devices: Redmi Note 4 (mido), Galaxy A3 (a3lte), Honor 6C Pro (HWJMM), HOMTOM S16

I'm using OneSignal version 3.10.1

@jkasten2
Copy link
Member

@danlex-corp After java.lang.IllegalArgumentException: it should provide a more specific error to help debug the issue. Can you provide this?

Are you able to reproduce the issue on your own device? There should be more details in the logcat.

Thanks.

@jkasten2 jkasten2 added Awaiting Details Possible Bug Maintainers need to confirm or reproduce labels Aug 28, 2018
@danlex-corp
Copy link
Author

@jkasten2 From Logcat: Error: requested job be persisted without holding RECEIVE_BOOT_COMPLETED permission.

An error occurs when applications are minimized.
I specifically did not add RECEIVE_BOOT_COMPLETED permissions, because I received a bad review.

@danlex-corp
Copy link
Author

I added this permissions, the problem was solved, but only after a full reinstallation of the application. When updating, the error remained. But I still do not want to prescribe this permisions, it may scare the user.

@jkasten2 jkasten2 added Improvement and removed Awaiting Details Possible Bug Maintainers need to confirm or reproduce labels Aug 28, 2018
@jkasten2
Copy link
Member

jkasten2 commented Aug 28, 2018

@danlex-corp Thanks for the details. Our SDK currently automatically adds this by default to restore notifications back to the notification shade on boot. This is to ensure the user does not miss any notification they haven't interacted with yet.

We will look into adding a runtime check to try to prevent this error for apps that have removed the permission.

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

No branches or pull requests

2 participants