cowbell / cordova-plugin-geofence

Geofencing plugin for cordova
Apache License 2.0
264 stars 318 forks source link

App crashing on Samsung devices #257

Open ds8k opened 6 years ago

ds8k commented 6 years ago

I've been getting hundreds of reports from Google about my application crashing on almost exclusively Samsung devices (S6 through S8) on Android 6.0 and up:

java.lang.IllegalArgumentException
in com.google.android.gms.location.Geofence$Builder.build

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3098)
  at android.app.ActivityThread.-wrap18 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1588)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:154)
  at android.app.ActivityThread.main (ActivityThread.java:6247)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:872)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:762)
Caused by: java.lang.IllegalArgumentException: 
  at com.google.android.gms.internal.zzcdr.<init> (Unknown Source)
  at com.google.android.gms.location.Geofence$Builder.build (Unknown Source)
  at com.cowbell.cordova.geofence.GeoNotification.toGeofence (GeoNotification.java:22)
  at com.cowbell.cordova.geofence.GeoNotificationManager.loadFromStorageAndInitializeGeofences (GeoNotificationManager.java:46)
  at com.cowbell.cordova.geofence.BootReceiver.onReceive (BootReceiver.java:13)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3091)

I've been unable to reproduce this issue on my own. If I'm reading the code correctly, it looks like it might be caused when launching the application from a notification?

Admittedly I am on an old version of the plugin, however I'm not sure if updating will fix this problem.