When I click to a pdf galley link to display it, I get an error message and pdf is not displayed on my mobile phone (Safari browser).
The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. ReadableStreamand/or Promise.allSettled); please use an ES5-compatible build instead.
Of course, it is well displayed on desktop browsers.
There are also some other web pages talking about the same error, but I couldn’t find an answer how to fix problem.
The iOS version is 12.4.9 on iPhone 6 plus, but I couldn’t find a way to get Safari version. According to a site, It should be version 12.
Regards,
Note: Interestingly, my phone can display pdf files of some other OJS 3.2.1-2 sites. So the issue might be specific to my installation or pdf file structure. For ex;
I suspect the node.js & npm versions might be responsible for this because I well remember its version was 12 or higher. I had made a custom node.js installation on the previous domain of the same installation. I cloned the OJS files only. I faced this issue after updated to 3.2.1-2 and seperated 2 journals to independent installations.
So, it is probably a server issue
I will update and look at the result
Regards,
I actually uploaded and extracted -es5-dist.zip version on to pdf.js folder within the pdfJsViewer folder, but it didn’t help. I don’t know more. If you can diplay the file, please can you inform me.
Regards,
Unfortunately, I don’t have iOS to test the bug with. Can you double-check if the javascript that you have added was applied to the page and that didn’t helped? Usually, it’s necessary to clear the browser’s cache.
I deleted ojs cache files, refreshed the mobile Safari but …
Should I have cleared the mobile Safari cache? I forgot about it. I will retry and write here if I can success.
Regards,
I decided to go on the issue. I updated the server nodejs version to v14.15.4, npm to 6.14.10. Even I installed OJS 3.2.1-2 using stable-3_2_1 branch of Github repository (to a test domain), but nothing changed.
Upon this, I deleted PDFjsviewer folder of current installation, and copied the PDFjsviewer plugin files from backup of previous installation (3.2.1.1). Everything was back to normal. I have no idea about the reason for this
I am sharing it here to be useful when someone else has the same problem.
Regards,