Compressor icon indicating copy to clipboard operation
Compressor copied to clipboard

NoSuchFileException

Open flobizDipen opened this issue 5 years ago • 10 comments

Fatal Exception: kotlin.io.NoSuchFileException: : 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 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:241) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:594) at kotlinx.coroutines.scheduling.CoroutineScheduler.access$createdWorkers(CoroutineScheduler.java:60) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:740)

flobizDipen avatar Jul 09 '20 07:07 flobizDipen

This could be due to read permissions. If you already added read permissions, there could be some issues due to Nougat version.In that case try adding

android:requestLegacyExternalStorage="true"

to application tag in manifest.

nareshkatta99 avatar Sep 10 '20 16:09 nareshkatta99

Fatal Exception: kotlin.io.NoSuchFileException: /storage/emulated/0/Android/media/YYYs/XXXX/2020-10-13-13-29-22-623.jpg: 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)

Pradeep0801 avatar Oct 13 '20 10:10 Pradeep0801

android:requestLegacyExternalStorage="true" this is already added in manifest

Pradeep0801 avatar Oct 13 '20 10:10 Pradeep0801

this issues is happening in 3.0.0 before this version app is working fine

Pradeep0801 avatar Oct 13 '20 10:10 Pradeep0801

@Pradeep0801 Is it happening on MI devices by any chance. Have been receiving reports on this device.

Protino avatar Oct 16 '20 05:10 Protino

this issues is happening in 3.0.0 before this version app is working fine

Happening on 2.x too.

Protino avatar Oct 16 '20 05:10 Protino

You can found util functions to solve this issue: FileUtil.java

You can found more here.

amrro avatar Oct 25 '20 11:10 amrro

Decision?

androiddevcoding avatar Nov 12 '20 09:11 androiddevcoding

What is the fix for this issue ?

pradeep-orbi avatar Feb 06 '22 06:02 pradeep-orbi