react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

Context.startForegroundService() did not then call Service.startForeground()

Open TamasFarago opened this issue 3 years ago • 3 comments

Your Environment

  • Plugin version: 0.6.6
  • Platform: iOS or Android: Android
  • OS version: 8
  • Device manufacturer and model: Xperia XA1 Ultra
  • Running in Simulator:
  • React Native version:
  • Plugin configuration options:
  • Link to your project:

Context

Firebase crashlytics reported an error:

Fatal Exception: android.app.RemoteServiceException Context.startForegroundService() did not then call Service.startForeground() android.app.ActivityThread$H.handleMessage (ActivityThread.java:1845) android.os.Handler.dispatchMessage (Handler.java:108) android.os.Looper.loop (Looper.java:206) android.app.ActivityThread.main (ActivityThread.java:6749) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:845)

I don't know why the crash is happening

Expected Behavior

No crash

Actual Behavior

Crash

Possible Fix

Steps to Reproduce

Context

Debug logs

TamasFarago avatar Mar 07 '22 15:03 TamasFarago

I have forked and released a new version of this library with fixes for android 12 issues and this crash. https://www.npmjs.com/package/@hariks789/react-native-background-geolocation Let me know if this fixes your issue

hariks789 avatar May 24 '22 07:05 hariks789

@hariks789 which is the branch that should work? develop?

AlessioMTX avatar Oct 30 '22 09:10 AlessioMTX

I have forked and released a new version of this library with fixes for android 12 issues and this crash.

https://www.npmjs.com/package/@hariks789/react-native-background-geolocation

Let me know if this fixes your issue

could you make PR ?

chanphiromsok avatar Dec 31 '22 00:12 chanphiromsok