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 on file opening #43

Closed joanisc closed 5 months ago

joanisc commented 1 year ago

[Please provide additional details and/or attach file]

Android Version: 10(29)

Intent { act=android.intent.action.VIEW cat=[android.intent.category.DEFAULT] dat=file:///storage/emulated/0/Download/Diari.pdf flg=0x10000000 cmp=universe.constellation.orion.viewer/.OrionViewerActivity }

java.lang.RuntimeException: cannot tell in file
    at com.artifex.mupdf.fitz.Document.openNativeWithPath(Native Method)
    at com.artifex.mupdf.fitz.Document.openDocument(Document.java:32)
    at com.artifex.mupdf.viewer.MuPDFCore.<init>(MuPDFCore.java:35)
    at universe.constellation.orion.viewer.pdf.PdfDocument.<init>(PdfDocument.kt:34)
    at universe.constellation.orion.viewer.FileUtil.openFile(FileUtil.kt:27)
    at universe.constellation.orion.viewer.OrionViewerActivity$openFile$1$newDocument$1.invokeSuspend(OrionViewerActivity.kt:309)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Docbroke commented 8 months ago

I am having similar issue when opening file from Telegram. However if I remove file permission from orion viewer, it can open file as a temporary file. The same pdf opens fine from whatsapp or file manager.

max-kammerer commented 5 months ago

@joanisc Could you please recheck your issue with latest version? (Have you provided read storage access to Orion?)

max-kammerer commented 5 months ago

@Docbroke I'm investigation problem with Telegram

max-kammerer commented 5 months ago

I am having similar issue when opening file from Telegram. However if I remove file permission from orion viewer, it can open file as a temporary file

@Docbroke In case when permissions are granted, do you have any error dialog with action options (it should also contain action with opening via temporary file, do you have it?)?

max-kammerer commented 5 months ago

@Docbroke problem with telegram should be fixed in fresh 0.90.1 version, it can be obtained in Google Play

max-kammerer commented 5 months ago

@joanisc I'm closing this issue as obsolete, feel free to reopen if you have it will appear in new versions