max-kammerer / orion-viewer

Orion Viewer is pdf, djvu, xps, cbz and tiff file viewer for Android devices based on mupdf and DjVuLibre libraries
Other
159 stars 52 forks source link

Error during file saving #50

Closed ntoniazzi closed 3 months ago

ntoniazzi commented 3 months ago
        [Please provide additional details]

        Orion Version: 0.92.1 (2163)}
        Android Version: 10 (29)
        ```
        intent=Intent { act=android.intent.action.VIEW dat=content://com.google.android.apps.nbu.files.provider/2/8661 typ=application/pdf flg=0x13000001 cmp=universe.constellation.orion.viewer/.OrionViewerActivity }

targetFile=file:///data/user/0/universe.constellation.orion.viewer/cache/content/com.google.android.apps.nbu.files.provider/8661/GAF%20-%20CF%20Individuel%202022%20-%20Liste%20des%20Qualifi%C3%A9es.pdf

java.io.FileNotFoundException: open failed: ENOENT (No such file or directory) at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:149) at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:705) at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1702) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1518) at android.content.ContentResolver.openInputStream(ContentResolver.java:1202) at universe.constellation.orion.viewer.FallbackDialogs$Companion$saveFileByUri$1$1.invokeSuspend(SourceFile:22) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9) at kotlinx.coroutines.DispatchedTask.run(SourceFile:115) at androidx.core.app.ActivityRecreator$1.run(SourceFile:14) at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)

        ```
max-kammerer commented 3 months ago

@ntoniazzi Thank you for reporting the issue. Could you please provide steps to reproduce it?

ntoniazzi commented 3 months ago

@max-kammerer When I opened Google Files, went to the "Downloads" Category, I could see a lot of old files, supposedly from /storage/emulated/0/Download/*. I didn't try before, but it fails with images too, using the default image viewer. And when I went to this folder by browsing from InternalStorage, there were only a few of those files, which I can open without any problem. I don't know why Google Files has this behavior, but it's definitely not related to Orion Viewer. Sorry about that. Regards, Nicolas.