xcarpentier / rn-pdf-reader-js

📄 PDF reader in JavaScript only for Expo - Android & iOS capable
MIT License
386 stars 163 forks source link

PDF Reader is not working for local files on Android build #181

Open juaal12 opened 1 year ago

juaal12 commented 1 year ago

Issue Description

I have an expo managed project where I am using this package for opening and reading PDFs. When it comes to remote PDFs (requests made to server and pdfs retrieved as base64 is working fine) but when I try to load locally stored pdfs within my application assets, is not working. On iOS it works like a charm (both cases are working fine). In addition, this package is working on expo local build using expo start

Steps to Reproduce / Code Snippets

Run an expo managed build using eas build --profile [YOURENVIRONMENT] --platform android --json --non-interactive

Wait until the end of the build and install your package on your device. If you open a remote pdf (server stored pdf) it will work but when trying to open a local pdf asset, it is not working.

image

Expected Results

Pdf should be shown and it is not being shown.

Additional Information

ADB logs: image

derkrasseleo commented 1 year ago

I am also facing this issue. iOS is working fine, but on android I don't even get that error message. I don't really have a clue, but the url shouldn't start with http:// if its a local file right?