bkonyi / FlutterGeofencing

Rough work for Flutter geofencing plugin
BSD 3-Clause "New" or "Revised" License
337 stars 219 forks source link

IllegalStateException in GeofencingService #60

Open JFreakDK opened 4 years ago

JFreakDK commented 4 years ago

In the crash section of google play console this error occurs a lot in our Android app:

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleCreateService (ActivityThread.java:3793)
  at android.app.ActivityThread.access$1400 (ActivityThread.java:241)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1823)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7156)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)
Caused by: java.lang.IllegalStateException: 
  at io.flutter.plugins.geofencing.GeofencingService.startGeofencingService (GeofencingService.kt:65)
  at io.flutter.plugins.geofencing.GeofencingService.onCreate (GeofencingService.kt:114)
  at android.app.ActivityThread.handleCreateService (ActivityThread.java:3781)

To match the line numbers we have deployed this version in our app: https://github.com/tashiwangdi/FlutterGeofencing/blob/master/android/src/main/kotlin/io/flutter/plugins/geofencing/GeofencingService.kt

A similar issue is tracked here: https://github.com/flutter/flutter/issues/59262

I don't know if there is anything specific to the Geofencing plugin that could cause this?