Error While compression The source file doesn't exist.
Fatal Exception: h.y.k: /data/user/0/com.package/cache/compressor/IMG_2020_07_04_15_09_29_429.jpg: The source file doesn't exist. at kotlin.io.FilesKt__UtilsKt.copyTo(FilesKt__UtilsKt.java:183) at kotlin.io.FilesKt__UtilsKt.copyTo$default(FilesKt__UtilsKt.java:181) at kotlin.io.FilesKt.copyTo$default(FilesKt.java) at id.zelory.compressor.constraint.DestinationConstraint.satisfy(DestinationConstraint.java:17) at id.zelory.compressor.Compressor$compress$3.invokeSuspend(Compressor.java:28) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:56) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:738) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:665)
Any solution you get for this?
I'm also facing this issue:
Fatal Exception: kotlin.io.NoSuchFileException: /data/user/0/com.package/cache/UPLOAD-49-38-38-8-4-7-2020691614128.jpg: The source file doesn't exist.
at kotlin.io.FilesKt__UtilsKt.copyTo(FilesKt__UtilsKt.java:183)
at kotlin.io.FilesKt__UtilsKt.copyTo$default(FilesKt__UtilsKt.java:181)
at kotlin.io.FilesKt.copyTo$default(FilesKt.java)
at id.zelory.compressor.UtilKt.copyToCache(UtilKt.java:82)
at id.zelory.compressor.Compressor$compress$3.invokeSuspend(Compressor.java:25)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:665)
I think this issue needs to be addressed, I've been facing scattered crashes with this stacktrace in my production app, it may be an edge case issue, or it may be a ticking time bomb 🤔
Created Pull request for the same here: https://github.com/zetbaitsu/Compressor/pull/161
Fatal Exception: kotlin.io.NoSuchFileException: /storage/emulated/0/Android/media The source file doesn't exist. at kotlin.io.FilesKt__UtilsKt.copyTo(Utils.kt:183) at kotlin.io.FilesKt__UtilsKt.copyTo$default(Utils.kt:181) 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(Dispatched.kt:241) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)
Device Details Device Brand: vivo Model: vivo 1907 Orientation: Portrait RAM free: 1.1 GB Disk free: 82.69 GB Operating System Version: 10 Orientation: Portrait Rooted: No
This might be related to this issue: https://github.com/zetbaitsu/Compressor/issues/159#issuecomment-716134695
@premacck @Pradeep0801 @Manoj-SYS-193 Any one of you, can you please provide some minimal source code to reproduce the issue? I'm not getting the issue if I'm using the example app.
If it is coming due to specific File Manager or Gallery app, please let us know that as well.