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

Unable to read PDF files from Kiwix-serve #670

Open
Popolechien opened this issue Mar 21, 2024 · 3 comments
Open

Unable to read PDF files from Kiwix-serve #670

Popolechien opened this issue Mar 21, 2024 · 3 comments
Assignees
Milestone

Comments

@Popolechien
Copy link
Member

It used to be that a user trying to access a PDF file from their mobile phone via Kiwix-serve (either directly from library.kiwix.org or from the hotspot) would be able to read them directly and without problem.

But now trying to check https://library.kiwix.org/viewer#maitre_lucas_completer_les_mots_fr_2023-05/files/compl%C3%A9ter%20les%20mots%205.pdf from my mobile leads to this:
Screenshot (21 mars 2024 12_08_12)

Phone is Nothing phone 2 running Android 14 and Google Chrome 122.0.6261.119

@kelson42
Copy link
Contributor

library.kiwix.org link works fine for me on my android. @rgaudin Do you see anything weird at http response level? Might that be that the problem is that the browser can simply nor handle properly the PDF (within the iframe)?

@kelson42 kelson42 self-assigned this Mar 21, 2024
@rgaudin
Copy link
Member

rgaudin commented Mar 21, 2024

I can reproduce on Chrome/Android but not on Firefox/Android

@rgaudin
Copy link
Member

rgaudin commented Mar 21, 2024

Refused to frame '' because it violates the following Content Security Policy directive: "frame-src 'self'".
viewer.js?cacheid=5fc4badf:282 Uncaught DOMException: Failed to read a named property 'href' from 'Location': Blocked a frame with origin "https://library.kiwix.org" from accessing a cross-origin frame.
    at handle_content_url_change (https://library.kiwix.org/skin/viewer.js?cacheid=5fc4badf:282:62)
    at on_content_load (https://library.kiwix.org/skin/viewer.js?cacheid=5fc4badf:393:5)
    at HTMLIFrameElement.onload (https://library.kiwix.org/viewer#maitre_lucas_completer_les_mots_fr_2023-05/home:77:32)
viewer.js?cacheid=5fc4badf:208 Uncaught TypeError: Cannot read properties of null (reading 'documentElement')
    at updateToolbarVisibilityState (viewer.js?cacheid=5fc4badf:208:24)
Screenshot 2024-03-21 at 14 10 04

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

No branches or pull requests

4 participants