transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

App crashes randomly #1378

Closed PuscasAdi closed 1 year ago

PuscasAdi commented 1 year ago

Your Environment

Expected Behavior

App should not crash randomly

Steps to Reproduce

  1. There are no exact steps to reproduce

Context

Our clients complain that the app crashes randomly. Also we have crash logs about this plugin regarding the crashes

com.equimaps.capacitor_background_geolocation.BackgroundGeolocationService$LocalBinder.onActivityStopped android.app.ForegroundServiceStartNotAllowedException

Type java.lang.RuntimeException Exception java.lang.RuntimeException: at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5159) at android.app.ActivityThread.performPauseActivity (ActivityThread.java:5110) at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:5062) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:229) at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2259) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:210) at android.os.Looper.loop (Looper.java:299) at android.app.ActivityThread.main (ActivityThread.java:8103) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:556) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045) Caused by android.app.ForegroundServiceStartNotAllowedException: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel (ForegroundServiceStartNotAllowedException.java:54) at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel (ForegroundServiceStartNotAllowedException.java:50) at android.os.Parcel.readParcelable (Parcel.java:3334) at android.os.Parcel.createExceptionOrNull (Parcel.java:2421) at android.os.Parcel.createException (Parcel.java:2410) at android.os.Parcel.readException (Parcel.java:2393) at android.os.Parcel.readException (Parcel.java:2335) at android.app.IActivityManager$Stub$Proxy.setServiceForeground (IActivityManager.java:7288) at android.app.Service.startForeground (Service.java:733) at com.equimaps.capacitor_background_geolocation.BackgroundGeolocationService$LocalBinder.onActivityStopped (BackgroundGeolocationService.java:146) at com.equimaps.capacitor_background_geolocation.BackgroundGeolocation.handleOnPause (BackgroundGeolocation.java:325) at com.getcapacitor.Bridge.onPause (Bridge.java:1221) at com.getcapacitor.BridgeActivity.onPause (BridgeActivity.java:93) at android.app.Activity.performPause (Activity.java:8449) at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1530) at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5149) Caused by android.os.RemoteException: Remote stack trace: at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked (ActiveServices.java:1859) at com.android.server.am.ActiveServices.setServiceForegroundLocked (ActiveServices.java:1368) at com.android.server.am.ActivityManagerService.setServiceForeground (ActivityManagerService.java:12227) at android.app.IActivityManager$Stub.onTransact (IActivityManager.java:3293) at com.android.server.am.ActivityManagerService.onTransact (ActivityManagerService.java:2559)

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ```