The issue being that no matter how often i restart the download that the download will immediately crash again or wait out and crash after some minutes.
java.lang.Exception: off=0, len=2096 out of bounds (size=0)
at com.shabinder.spotiflyer.service.ForegroundService$enqueueDownload$2.emit(ForegroundService.kt:6)
at com.shabinder.spotiflyer.service.ForegroundService$enqueueDownload$2.emit(ForegroundService.kt:1)
at com.shabinder.common.core_components.file_manager.FileManagerKt$downloadFile$4.invokeSuspend(FileManager.kt:54)
at com.shabinder.common.core_components.file_manager.FileManagerKt$downloadFile$4.invoke(Unknown Source:11)
at com.shabinder.common.core_components.file_manager.FileManagerKt$downloadFile$4.invoke(Unknown Source:6)
at kotlinx.coroutines.flow.FlowKtErrorsKt$catch$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:94)
at kotlinx.coroutines.flow.FlowKtErrorsKt$catch$$inlined$unsafeFlow$1$1.invokeSuspend(Unknown Source:12)
at h7.a.resumeWith(ContinuationImpl.kt:10)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24)
at h7.a.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24)
at h7.a.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24)
at h7.a.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24)
at h7.a.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24)
at h7.a.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:12)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:2)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:0)
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:0)
The issue being that no matter how often i restart the download that the download will immediately crash again or wait out and crash after some minutes.
java.lang.Exception: off=0, len=2096 out of bounds (size=0) at com.shabinder.spotiflyer.service.ForegroundService$enqueueDownload$2.emit(ForegroundService.kt:6) at com.shabinder.spotiflyer.service.ForegroundService$enqueueDownload$2.emit(ForegroundService.kt:1) at com.shabinder.common.core_components.file_manager.FileManagerKt$downloadFile$4.invokeSuspend(FileManager.kt:54) at com.shabinder.common.core_components.file_manager.FileManagerKt$downloadFile$4.invoke(Unknown Source:11) at com.shabinder.common.core_components.file_manager.FileManagerKt$downloadFile$4.invoke(Unknown Source:6) at kotlinx.coroutines.flow.FlowKtErrorsKt$catch$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:94) at kotlinx.coroutines.flow.FlowKtErrorsKt$catch$$inlined$unsafeFlow$1$1.invokeSuspend(Unknown Source:12) at h7.a.resumeWith(ContinuationImpl.kt:10) at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55) at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17) at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0) at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24) at h7.a.resumeWith(ContinuationImpl.kt:33) at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55) at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17) at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0) at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24) at h7.a.resumeWith(ContinuationImpl.kt:33) at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55) at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17) at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0) at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24) at h7.a.resumeWith(ContinuationImpl.kt:33) at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55) at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17) at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0) at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24) at h7.a.resumeWith(ContinuationImpl.kt:33) at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:55) at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:17) at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:0) at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:24) at h7.a.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:12) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:2) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:0) 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:0)
I'm using a Redmi note i9 android