Nailik / rhasspy_mobile

Rhasspy is a voice assistant software. This repository implements the functionality of a Rhasspy satellite, with local wake word recognition.
66 stars 4 forks source link

IllegalStateException - Not allowed to start service Intent { cmp=org.rhasspy.mobile.android/org.rhasspy.mobile.platformspecific.background.BackgroundService #503

Closed Nailik closed 1 year ago

Nailik commented 1 year ago

Looks like the app is starting the background service too early?

1 | 04:18:49.598 PM | view_list | Assert: (AndroidApplication) uncaught exception in Thread Thread[DefaultDispatcher-worker-1,5,main]
-- | -- | -- | --
  | 2 | 04:18:49.342 PM | view_list | Info: (Application) ######## Application   started ########
Non-fatal Exception: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=org.rhasspy.mobile.android/org.rhasspy.mobile.platformspecific.background.BackgroundService }: app is in background uid UidRecord{9600161 u0a121 TRNB idle change:uncached procs:1 seq(0,0,0)}
       at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1528)
       at android.app.ContextImpl.startService(ContextImpl.java:1484)
       at android.content.ContextWrapper.startService(ContextWrapper.java:650)
       at org.rhasspy.mobile.platformspecific.background.BackgroundService.start(BackgroundService.kt:29)
       at org.rhasspy.mobile.app.Application$onCreated$2.invokeSuspend(Application.kt:329)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:94)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:3)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:2)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:14)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:28)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt)