Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash due to Foreground Service on Android #189

Open
BinhTNT opened this issue Dec 9, 2024 · 0 comments
Open

Crash due to Foreground Service on Android #189

BinhTNT opened this issue Dec 9, 2024 · 0 comments

Comments

@BinhTNT
Copy link

BinhTNT commented Dec 9, 2024

Hello,
Our app get crashed sometimes when executing startForegroundService on Android.

Here is the stack trace:
Fatal Exception: android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false: service packagename/com.pilloxa.dfu.DfuService
at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
at android.os.Parcel.readParcelableInternal(Parcel.java:5075)
at android.os.Parcel.readParcelable(Parcel.java:5057)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3237)
at android.os.Parcel.createException(Parcel.java:3226)
at android.os.Parcel.readException(Parcel.java:3209)
at android.os.Parcel.readException(Parcel.java:3151)
at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:6393)
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1960)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1935)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:832)
at no.nordicsemi.android.dfu.DfuBaseService.onHandleIntent(DfuBaseService.java:1361)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:77)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:85)

react-native-nordic-dfu: 3.2.1

Do you have an idea to fix it ?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant