Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File already exist exception when attempting to compress some images (random) #208

Open
YsrBouhamria opened this issue Jun 19, 2023 · 1 comment

Comments

@YsrBouhamria
Copy link

YsrBouhamria commented Jun 19, 2023

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.FilesKt__UtilsKt.copyTo(Utils.kt:226)
at kotlin.io.FilesKt__UtilsKt.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)

@rohitjakhar
Copy link

Did you find any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants