Rapsssito / react-native-background-actions

React Native background service library for running background tasks forever in Android & iOS.
MIT License
818 stars 117 forks source link

RNBackgroundActionsTask.onStartCommand #238

Open faizanbutt opened 2 months ago

faizanbutt commented 2 months ago

Fatal Exception: java.lang.RuntimeException Unable to start service com.asterinet.react.bgactions.RNBackgroundActionsTask@cedd488 with Intent { cmp=com.myapp/com.asterinet.react.bgactions.RNBackgroundActionsTask (has extras) }: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.myapp/com.asterinet.react.bgactions.RNBackgroundActionsTask.

I am getting this error on Firebase Crashlytics for some time. Using the latest version of react-native-background-actions 4.0.1. All the crashes are occurring in background mode of the devices on android 13 and android 14.

Anyone can help in this ?

faizanbutt commented 2 months ago

@NhutDang2002 What's that file ?

ajinvm commented 2 months ago

Did someone find the fix,? i am facing same issue

Fatal Exception: java.lang.RuntimeException Unable to start service com.asterinet.react.bgactions.RNBackgroundActionsTask@f8f1ffa with Intent { cmp=com.vmtrackers/com.asterinet.react.bgactions.RNBackgroundActionsTask (has extras) mCallingUid=10373 }: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.vmtrackers/com.asterinet.react.bgactions.RNBackgroundActionsTask android.app.ActivityThread.handleServiceArgs (ActivityThread.java:5134)

com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1049) Caused by android.app.ForegroundServiceStartNotAllowedException Service.startForeground() not allowed due to mAllowStartForeground false: service com.vmtrackers/com.asterinet.react.bgactions.RNBackgroundActionsTask