Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Help! PDF error on mobile only 'file origin does not match viewers' #15197

Closed
jwphotos opened this issue Jul 20, 2022 · 1 comment
Closed

Help! PDF error on mobile only 'file origin does not match viewers' #15197

jwphotos opened this issue Jul 20, 2022 · 1 comment

Comments

@jwphotos
Copy link

Attach (recommended) or Link to PDF file here:

https://www.jessicaweinstockphotography.com/wp-content/uploads/2022/07/2022-Family-Guide-2.pdf

https://www.jessicaweinstockphotography.com/wp-content/uploads/2022/07/2022-Newborn-Guide.pdf

Configuration:

  • Web browser and its version: (any mobile that I have tested both ios and andriod)
  • Operating system and its version: (any mobile that I have tested both ios and andriod)
  • PDF.js version: Version 2.1.7
  • Is a browser extension:

Steps to reproduce the problem:

  1. open link www.jessicaweinstockphotography.com/family-guide and www.jessicaweinstockphotography.com/newborn-guide
    both in mobile only. Works fine on desktop

What is the expected behavior? (add screenshot): Need it to be viewable on mobile devices.

What went wrong? (add screenshot): Had malware attack on my website due to firewall issue with my security company. Had my site cleaned and back up reloaded/wordpress updated to current version. Prior to this (July 1, 2022) it worked just fine in mobile. I see that it says in my plug in viewer area on wordpress it says that this plug in hasn't been tested with the newest version of WP. image attached of error on mobile.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
IMG_3383

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Jul 20, 2022

PDF.js version: Version 2.1.7

That version is no longer supported, and it's also not an official release; please find the latest releases at https://mozilla.github.io/pdf.js/getting_started/#download

open link www.jessicaweinstockphotography.com/family-guide and www.jessicaweinstockphotography.com/newborn-guide
both in mobile only. Works fine on desktop

In a desktop Firefox or Chrome browser, both of those viewers fail to load with the following error (and that PDF.js version is over seven years old):

PDF.js v1.1.1 (build: a1e0859)
Meddelande: Unexpected server response (0) while retrieving PDF "https://www.jessicaweinstockphotography.com/wp-content/uploads/2022/07/2022-Family-Guide-2.pdf".

Had malware attack on my website due to firewall issue with my security company. Had my site cleaned and back up reloaded/wordpress updated to current version. Prior to this (July 1, 2022) it worked just fine in mobile. I see that it says in my plug in viewer area on wordpress it says that this plug in hasn't been tested with the newest version of WP. image attached of error on mobile.

It actually sounds like your issue is with some Wordpress-plugin, which is not something that's being developed in this repository and thus we unfortunately cannot provide any support for that here.
(Your image also contains yet another, and likewise, unsupported PDF.js version number.)


All-in-all, given the severely outdated PDF.js versions mentioned above, we can only really suggest extending

pdf.js/web/app.js

Lines 2163 to 2167 in 408c10b

const HOSTED_VIEWER_ORIGINS = [
"null",
"http://mozilla.github.io",
"https://mozilla.github.io",
];
as appropriate for your implementation; please also see PR #6916.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants