Onesignal-android-sdk: Oppo Devices - java.lang.NullPointerException: at android.os.Parcel.readException

Created on 26 Mar 2018  路  24Comments  路  Source: OneSignal/OneSignal-Android-SDK

java.lang.NullPointerException:
at android.os.Parcel.readException (Parcel.java:1562)
at android.os.Parcel.readException (Parcel.java:1509)
at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:122)
at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:42)
at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncServiceAsJob (OneSignalSyncServiceUtils.java:136)

Hi, can i know what kind of situation will trigger this error? Thanks.

Medium Priority Compatibility Issue

All 24 comments

@hockleongloh Can you provide any more details about this error?

  1. What version of the OneSignal SDK are you using?
  2. Are you able to reproduce the issue on your test devices?
  3. What versions of Android and device models are you seeing the crash on?
  4. If this is in a production app how many devices and instances are you seeing this crash?

@jkasten2 hi i am also getting this issue on some devices

as you ask the details i will provide my infos

  1. Version- 3.8.3 (com.onesignal:OneSignal:3.8.3)
  2. No issues on my testing devices
  3. Oppo CPH1609 (CPH1609), 4096MB RAM, Android 6.0 and Oppo A1601 (A1601), 3072MB RAM, Android 5.1
  4. Yes it is happening on production i released app one day(1/4/2018) back i saw these two crashes both on oppo devices.

Is this a critical crash if yes please hep me more than 2500 active user having these devices, please help

@rameshvoltella Thanks for the details, are you only seeing this crash on Oppo devices running Android 5.1 and 6.0?

@jkasten2 yes till now am seeing this on these two devices, i only released an update with onesignal yesterday, till now only two device having this issue.

@jkasten2 is the version and all am using is correct only right?

@rameshvoltella Correct, 3.8.3 is the latest SDK version. You can always check this page for the latest releases.
https://github.com/OneSignal/OneSignal-Android-SDK/releases

Odd that this seems Oppo specific. We investigate this crash in more detail this week

@jkasten2 hi, now i got two more crash for oppo devices
Oppo CPH1701 (CPH1701), 3072MB RAM, Android 6.0 and Oppo A1601 (A1601), 3072MB RAM, Android 5.1

i am worried its gone impact all my oppo user once they update, because i am not sure what this crash do
please clear my doubt will my app crash when app get opened because of it?

This is the stack trace

java.lang.NullPointerException: 
at android.os.Parcel.readException (Parcel.java:1636)
at android.os.Parcel.readException (Parcel.java:1583)
at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:122)
at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:42)
at com.onesignal.OneSignalSyncServiceUtils.access$000 (OneSignalSyncServiceUtils.java)
or                     .scheduleSyncServiceAsJob (OneSignalSyncServiceUtils.java)
or                     .syncServicePendingIntent (OneSignalSyncServiceUtils.java)
at com.onesignal.OneSignalSyncServiceUtils.cancelSyncTask (OneSignalSyncServiceUtils.java)
or                     .scheduleSyncTask (OneSignalSyncServiceUtils.java)
or                     .stopSyncBgThread (OneSignalSyncServiceUtils.java)
at com.onesignal.OneSignalSyncServiceUtils.access$002 (OneSignalSyncServiceUtils.java)
or                     .doBackgroundSync (OneSignalSyncServiceUtils.java)
or                     .scheduleLocationUpdateTask (OneSignalSyncServiceUtils.java)
or                     .scheduleSyncTask (OneSignalSyncServiceUtils.java)
or                     .syncOnFocusTime (OneSignalSyncServiceUtils.java)
at com.onesignal.LocationGMS.access$302 (LocationGMS.java)
or                     .fireComplete (LocationGMS.java)
or                     .getLocation (LocationGMS.java)
or                     .scheduleUpdate (LocationGMS.java)
or                     .setLastLocationTime (LocationGMS.java)
or                     .startGetLocation (LocationGMS.java)
at com.onesignal.LocationGMS$1.run (LocationGMS.java)
at java.lang.Thread.run (Thread.java:818)

@jkasten2 app is getting high 7 crashes now all are oppo device, need urgent help, what should i do for now?

@jkasten2 hi i am checking like this now

```
if (!("oppo".equalsIgnoreCase(manufacturer))) {

            OneSignal.startInit(this)
                    .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification)
                    .setNotificationOpenedHandler(new OneSignalNotificationOpenedHandler(getApplicationContext()))
                    .unsubscribeWhenNotificationsAreDisabled(true)
                    .init();

        }

if manufacture is oppo i am not enabling onesignal is this fine for now to avoid crash?
Please mention some paid users are using oppo device, i want your guidance Please help
```

@rameshvoltella Can you recopy your stacktrace? It is missing line number for most lines. The crash being reported with the app in the background or the foreground?

@jkasten2 am copying the log from playstore console, am using pro guard also ,The number is like 1,2,3 only on play store This is the stacktrace got for Oppo X9009 (X9009), 4096MB RAM, Android 5.1

The crash being reported with the app in the background or the foreground

i dont know that but i havent see any oppo users on my onesignal dashboard,also i want to know is the background crash affects the app usage?

java.lang.NullPointerException: 

  at android.os.Parcel.readException (Parcel.java:1562)

  at android.os.Parcel.readException (Parcel.java:1509)

  at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:122)

  at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:42)

  at com.onesignal.OneSignalSyncServiceUtils.access$000 (OneSignalSyncServiceUtils.java)
  or                     .scheduleSyncServiceAsJob (OneSignalSyncServiceUtils.java)
  or                     .syncServicePendingIntent (OneSignalSyncServiceUtils.java)

  at com.onesignal.OneSignalSyncServiceUtils.cancelSyncTask (OneSignalSyncServiceUtils.java)
  or                     .scheduleSyncTask (OneSignalSyncServiceUtils.java)
  or                     .stopSyncBgThread (OneSignalSyncServiceUtils.java)

  at com.onesignal.OneSignalSyncServiceUtils.access$002 (OneSignalSyncServiceUtils.java)
  or                     .doBackgroundSync (OneSignalSyncServiceUtils.java)
  or                     .scheduleLocationUpdateTask (OneSignalSyncServiceUtils.java)
  or                     .scheduleSyncTask (OneSignalSyncServiceUtils.java)
  or                     .syncOnFocusTime (OneSignalSyncServiceUtils.java)

  at com.onesignal.LocationGMS.access$302 (LocationGMS.java)
  or                     .fireComplete (LocationGMS.java)
  or                     .getLocation (LocationGMS.java)
  or                     .scheduleUpdate (LocationGMS.java)
  or                     .setLastLocationTime (LocationGMS.java)
  or                     .startGetLocation (LocationGMS.java)

  at com.onesignal.LocationGMS.access$100 (LocationGMS.java)
  or                     .fireCompleteForLocation (LocationGMS.java)

  at com.onesignal.LocationGMS.access$500 (LocationGMS.java)
  or                     .fireFailedComplete (LocationGMS.java)
  or                     .hasLocationPermission (LocationGMS.java)

  at com.onesignal.LocationGMS$GoogleApiClientListener.onConnected (LocationGMS.java)
  or                     .onConnectionFailed (LocationGMS.java)
  or                     .onConnectionSuspended (LocationGMS.java)

  at com.google.android.gms.common.internal.zzae.registerConnectionCallbacks (zzae.java)
  or                     .registerConnectionFailedListener (zzae.java)
  or                     .zzams (zzae.java)
  or                     .zzcf (zzae.java)
  or                     .zzk (zzae.java)
  or                     .zzl (zzae.java)

  at com.google.android.gms.common.api.internal.zzba.connect (zzba.java)
  or                     .dump (zzba.java)
  or                     .registerConnectionFailedListener (zzba.java)
  or                     .zza (zzba.java)
  or                     .zzc (zzba.java)
  or                     .zzd (zzba.java)
  or                     .zzf (zzba.java)
  or                     .zzk (zzba.java)

  at com.google.android.gms.common.api.internal.zzao.zzajm (zzao.java)
  or                     .zzf (zzao.java)

  at com.google.android.gms.common.api.internal.zzao.begin (zzao.java)
  or                     .onConnected (zzao.java)
  or                     .onConnectionSuspended (zzao.java)
  or                     .zza (zzao.java)
  or                     .zzbk (zzao.java)
  or                     .zzd (zzao.java)

  at com.google.android.gms.common.api.internal.zzbi.connect (zzbi.java)
  or                     .dump (zzbi.java)
  or                     .onConnected (zzbi.java)
  or                     .onConnectionSuspended (zzbi.java)
  or                     .zza (zzbi.java)
  or                     .zzb (zzbi.java)
  or                     .zzd (zzbi.java)
  or                     .zzg (zzbi.java)

  at com.google.android.gms.common.api.internal.zzt.onConnected (zzt.java)
  or                     .onConnectionFailed (zzt.java)
  or                     .onConnectionSuspended (zzt.java)
  or                     .zza (zzt.java)
  or                     .zzair (zzt.java)

  at com.google.android.gms.common.internal.zzac.onConnected (zzac.java)
  or                     .onConnectionSuspended (zzac.java)

  at com.google.android.gms.common.internal.zzn.zzama (zzn.java)
  or                     .zzj (zzn.java)

  at com.google.android.gms.common.internal.zze.zzama (zze.java)
  or                     .zzj (zze.java)
  or                     .zzw (zze.java)

  at com.google.android.gms.common.internal.zzi.zzamc (zzi.java)

  at com.google.android.gms.common.internal.zzh.handleMessage (zzh.java)

  at android.os.Handler.dispatchMessage (Handler.java:111)

  at android.os.Looper.loop (Looper.java:210)

  at android.os.HandlerThread.run (HandlerThread.java:61)

Now am gone write the following condition on my application class

if (!("oppo".equalsIgnoreCase(manufacturer))) {

               OneSignal.startInit(this)
                       .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification)
                       .setNotificationOpenedHandler(new OneSignalNotificationOpenedHandler(getApplicationContext()))
                       .unsubscribeWhenNotificationsAreDisabled(true)
                       .init();

           }

i dont wanna loose my paid customers due to this issue, please fix it, will update once this issue get resolved, any help needed from my side please ask. Thank you.

@jkasten2 hi yesterday i have released the new version of my app with restricting oppo devices

if (!("oppo".equalsIgnoreCase(manufacturer))) {

               OneSignal.startInit(this)
                       .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification)
                       .setNotificationOpenedHandler(new OneSignalNotificationOpenedHandler(getApplicationContext()))
                       .unsubscribeWhenNotificationsAreDisabled(true)
                       .init();

           }

This is what i used but still this crash is listing on my crash list same oppo device, i dont understand how does this happens, need you help its very urgent, can you tell me a way to avoid oppo devices from my update till this issue get fixed.

@rameshvoltella Thanks for the new stack trace, as you noted I think your Proguard setting are moving most of the line number. However your stack is good enough to see where it is being thrown from.

As a fix we will add a catch to this specific exception to work around the Oppo ROM bug you are seeing.

In the mind time is your code omitting Oppo devices ok to fix the issue?

@jkasten2 happy that helped you, but the condition i used to omit the oppo device is not working

if (!("oppo".equalsIgnoreCase(manufacturer))) {

               OneSignal.startInit(this)
                       .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification)
                       .setNotificationOpenedHandler(new OneSignalNotificationOpenedHandler(getApplicationContext()))
                       .unsubscribeWhenNotificationsAreDisabled(true)
                       .init();

           }

The above line i added but still crash is reporting on my newer version.?Please give a help

@jkasten2 any updates?

@jkasten2 hi its been 4 days no updates, i have stop all onesignal functionality with my app, because paid users on oppo device started complaint about app crash, Please let me know when you guys can fix this,
Thank you

@jkasten2 Hi, any new release for this issue?

@hockleongloh We are working on this fix and a few others to be added to the next release.

Can you let us know the device models, manufactures, and Android versions you are seeing this issue on? Is it only Oppo devices as @rameshvoltella is seeing?

@jkasten2 Yup. The Oppo devices that facing this issue is same as @rameshvoltella

I have same issue with lastest sdk version 3.8.3 on Oppo device with os 5 and 6.
This is crash report:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.server.job.controllers.JobStatus.getUid()' on a null object reference
       at android.os.Parcel.readException(Parcel.java:1562)
       at android.os.Parcel.readException(Parcel.java:1509)
       at android.app.job.IJobScheduler$Stub$Proxy.schedule(IJobScheduler.java:122)
       at android.app.JobSchedulerImpl.schedule(JobSchedulerImpl.java:42)
       at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncServiceAsJob(OneSignalSyncServiceUtils.java:136)
       at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncTask(OneSignalSyncServiceUtils.java:113)
       at com.onesignal.OneSignalSyncServiceUtils.scheduleLocationUpdateTask(OneSignalSyncServiceUtils.java:55)
       at com.onesignal.LocationGMS.scheduleUpdate(LocationGMS.java:98)
       at com.onesignal.LocationGMS.fireCompleteForLocation(LocationGMS.java:278)
       at com.onesignal.LocationGMS.access$500(LocationGMS.java:55)
       at com.onesignal.LocationGMS$GoogleApiClientListener.onConnected(LocationGMS.java:292)
       at com.google.android.gms.common.internal.zzae.zzl(Unknown Source)
       at com.google.android.gms.common.api.internal.zzba.zzk(Unknown Source)
       at com.google.android.gms.common.api.internal.zzao.zzajm(Unknown Source)
       at com.google.android.gms.common.api.internal.zzao.onConnected(Unknown Source)
       at com.google.android.gms.common.api.internal.zzbi.onConnected(Unknown Source)
       at com.google.android.gms.common.api.internal.zzt.onConnected(Unknown Source)
       at com.google.android.gms.common.internal.zzac.onConnected(Unknown Source)
       at com.google.android.gms.common.internal.zzn.zzama(Unknown Source)
       at com.google.android.gms.common.internal.zze.zzw(Unknown Source)
       at com.google.android.gms.common.internal.zzi.zzamc(Unknown Source)
       at com.google.android.gms.common.internal.zzh.handleMessage(Unknown Source)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loop(Looper.java:210)
       at android.os.HandlerThread.run(HandlerThread.java:61)

This should now be fixed in the 3.8.4 update>
https://github.com/OneSignal/OneSignal-Android-SDK/releases/tag/3.8.4

@jkasten2 when will the OneSignal Unity patch due to this issue? i keep getting this exception on Android. The latest OneSignal Unity is still 3.8.3 i think. Thanks

@jkasten2 I am also receiving the same crash error but on device model - LAVA Z61_2GB. Till now i got 9 reports for past week and it keeps increasing every day. I'm using :
Onesignal Unity - 2.7.6
Unity3D -2018.2.11f1
Here's the stack trace:

`java.lang.Error: FATAL EXCEPTION [OSH_LocationHandlerThread]
Unity version     : 2018.2.11f1
Device model      : LAVA Z61_2GB
Device fingerprint: LAVA/Z61_2GB/Z61_2GB:8.1.0/O11019/1533889281:user/release-keys
Caused by

  at android.os.Parcel.readException (Parcel.java:2009)

  at android.os.Parcel.readException (Parcel.java:1951)

  at android.app.job.IJobScheduler$Stub$Proxy.schedule (IJobScheduler.java:180)

  at android.app.JobSchedulerImpl.schedule (JobSchedulerImpl.java:44)

  at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncServiceAsJob (OneSignalSyncServiceUtils.java:137)

  at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncTask (OneSignalSyncServiceUtils.java:113)

  at com.onesignal.OneSignalSyncServiceUtils.scheduleLocationUpdateTask (OneSignalSyncServiceUtils.java:55)

  at com.onesignal.LocationGMS.scheduleUpdate (LocationGMS.java:102)

  at com.onesignal.LocationGMS.fireCompleteForLocation (LocationGMS.java:289)

  at com.onesignal.LocationGMS.access$500 (LocationGMS.java:55)

  at com.onesignal.LocationGMS$GoogleApiClientListener.onConnected (LocationGMS.java:317)

  at com.google.android.gms.common.internal.GmsClientEventManager.onConnectionSuccess (Unknown Source:108)

  at com.google.android.gms.common.api.internal.zzav.zzb (Unknown Source:22)

  at com.google.android.gms.common.api.internal.zzaj.zzat (Unknown Source:89)

  at com.google.android.gms.common.api.internal.zzaj.onConnected (Unknown Source:21)

  at com.google.android.gms.common.api.internal.zzbd.onConnected (Unknown Source:7)

  at com.google.android.gms.common.api.internal.zzp.onConnected (Unknown Source:5)

  at com.google.android.gms.common.internal.zzf.onConnected (Unknown Source:2)

  at com.google.android.gms.common.internal.BaseGmsClient$PostInitCallback.handleServiceSuccess (Unknown Source:143)

  at com.google.android.gms.common.internal.BaseGmsClient$zza.deliverCallback (Unknown Source:45)

  at com.google.android.gms.common.internal.BaseGmsClient$zza.deliverCallback (Unknown Source:2)

  at com.google.android.gms.common.internal.BaseGmsClient$CallbackProxy.deliverCallback (Unknown Source:54)

  at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage (Unknown Source:275)

  at android.os.Handler.dispatchMessage (Handler.java:106)

  at android.os.Looper.loop (Looper.java:164)

  at android.os.HandlerThread.run (HandlerThread.java:65)`

Hi @jkasten2
We're seeing the same issue / callstack as @reddy36996. It only seems to be affecting LAVA android devices for us too.

Fatal Exception: java.lang.Error: FATAL EXCEPTION [FocusHandlerThread]
Unity version : 2018.3.2f1
Device model : LAVA Z61_2GB
Device fingerprint: LAVA/Z61_2GB/Z61_2GB:8.1.0/O11019/1545204789:user/release-keys

We're currently running these versions.
OneSignal Unity : 2.7.8
Unity 3D : 2018.3.2f1

@davidbeps You can follow issue #670 for the Lava specific problem you are seeing.

Was this page helpful?
0 / 5 - 0 ratings