Hey, I keep getting this crash on some instances, can't really reproduce, any idea what could be wrong?
It happens in devices running android 8, until 13
Fatal Exception: kotlin.io.FileAlreadyExistsException: /data/user/0/com.my.app/files/IMG_20230531_100341.jpg -> /data/user/0/com.my.app/cache/compressor/IMG_20230531_100341.jpg: Tried to overwrite the destination, but failed to delete it.
at kotlin.io.FilesKtUtilsKt.copyTo(Utils.kt:226)
at kotlin.io.FilesKtUtilsKt.copyTo$default(Utils.kt:217)
at id.zelory.compressor.UtilKt.copyToCache(Util.kt:82)
at id.zelory.compressor.Compressor$compress$3.invokeSuspend(Compressor.kt:25)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Hey, I keep getting this crash on some instances, can't really reproduce, any idea what could be wrong? It happens in devices running android 8, until 13 Fatal Exception: kotlin.io.FileAlreadyExistsException: /data/user/0/com.my.app/files/IMG_20230531_100341.jpg -> /data/user/0/com.my.app/cache/compressor/IMG_20230531_100341.jpg: Tried to overwrite the destination, but failed to delete it. at kotlin.io.FilesKtUtilsKt.copyTo(Utils.kt:226) at kotlin.io.FilesKtUtilsKt.copyTo$default(Utils.kt:217) at id.zelory.compressor.UtilKt.copyToCache(Util.kt:82) at id.zelory.compressor.Compressor$compress$3.invokeSuspend(Compressor.kt:25) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)