Describe the Bug
Downloading of large music playlists crashes flow.
Steps to Reproduce
- Open Flow and navigate to 'Library'
- Tap on 'Music Playlists'
- Perform an album 'Download'
- Flow lags and crashes after awhile. it also crashes SystemUI randomly.
Expected Behavior
Finish the download without crashing
Actual Behavior
Flow becomes slow and laggy then crashes. Multiple times.
Error 1:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{5227922 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}
Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)
Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{5227922 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Error 2:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{7df37e5 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}
Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)
Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{7df37e5 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here at android.app.ContextImpl.startServiceCommon(ContextImpl.java:2115) at android.app.ContextImpl.startForegroundService(ContextImpl.java:2069) at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:875) at io.github.aedev.flow.data.video.downloader.FlowDownloadService$Companion.startDownload(FlowDownloadService.kt:197) at io.github.aedev.flow.data.video.downloader.FlowDownloadService$Companion.startDownload$default(FlowDownloadService.kt:156) at io.github.aedev.flow.data.music.DownloadManager$downloadTrack$2.invokeSuspend(DownloadManager.kt:184) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:266) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
Error 3:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{761780d u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}
Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)
Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{761780d u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Error 4:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{820f189 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}
Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)
Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{820f189 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Environment
| Field |
Value |
| Device |
Google Pixel 9a |
| Android Version |
Android: 16 (SDK 36) |
| Flow Version |
2.1.5-nightly (16) |
| Installation Source |
GitHub APK |
| ROM |
CrDroid |
Frequency
Affected Area
Logs (Optional but Helpful)
Click to expand logs
Additional Context
I will paste a logcat soon.
Describe the Bug
Downloading of large music playlists crashes flow.
Steps to Reproduce
Expected Behavior
Finish the download without crashing
Actual Behavior
Flow becomes slow and laggy then crashes. Multiple times.
Error 1:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{5227922 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{5227922 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)Error 2:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{7df37e5 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{7df37e5 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here at android.app.ContextImpl.startServiceCommon(ContextImpl.java:2115) at android.app.ContextImpl.startForegroundService(ContextImpl.java:2069) at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:875) at io.github.aedev.flow.data.video.downloader.FlowDownloadService$Companion.startDownload(FlowDownloadService.kt:197) at io.github.aedev.flow.data.video.downloader.FlowDownloadService$Companion.startDownload$default(FlowDownloadService.kt:156) at io.github.aedev.flow.data.music.DownloadManager$downloadTrack$2.invokeSuspend(DownloadManager.kt:184) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:266) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)Error 3:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{761780d u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{761780d u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)Error 4:
Exception: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException Message: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{820f189 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly}Device Info: Model: Pixel 9a Manufacturer: Google Android: 16 (SDK 36) Brand: google Device: tegu App Version: 2.1.5-nightly (16)Stack Trace: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{820f189 u0 io.github.aedev.flow.nightly/io.github.aedev.flow.data.video.downloader.FlowDownloadService c:io.github.aedev.flow.nightly} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2531) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2499) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2883) at android.os.Handler.dispatchMessage(Handler.java:132) at android.os.Looper.dispatchMessage(Looper.java:333) at android.os.Looper.loopOnce(Looper.java:263) at android.os.Looper.loop(Looper.java:367) at android.app.ActivityThread.main(ActivityThread.java:9328) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)Environment
Frequency
Affected Area
Logs (Optional but Helpful)
Click to expand logs
Additional Context
I will paste a logcat soon.