Skip to content

[BUG] Fatal Exception: android.app.ForegroundServiceStartNotAllowedException #132

Description

@benjamin-cheng

Describe the bug

Fatal Exception: android.app.ForegroundServiceStartNotAllowedException
startForegroundService() not allowed due to mAllowStartForeground false: service dev.rocketscientists.rocket/org.mozilla.rocket.download.data.RelocateService
android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel (ForegroundServiceStartNotAllowedException.java:54)

androidx.core.content.ContextCompat.startForegroundService (ContextCompat.java:703)
org.mozilla.rocket.download.data.RelocateService$Companion.startActionMove (RelocateService.kt:264)
org.mozilla.rocket.download.data.DownloadCompleteReceiver$startRelocationService$2.invokeSuspend (DownloadCompleteReceiver.kt:92)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)
kotlinx.coroutines.internal.LimitedDispatcher.run (LimitedDispatcher.kt:42)
kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:95)
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:570)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:749)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:677)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:664)

Steps To Reproduce
Download files when app is in the background on Android 12+ devices

Device info (please complete the following information):
Android 12+

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions