PDF.JS viewer display Error 500

There is a continuing error with the PDF Display plugin in 3.3.x which I am unable to pinpoint because it happens on my production server but not on my testing server (to which I have full access).

Documented previously here although it was not resolved except by deactivating PDF.JS plugin: PDFs are not displayed after upgrading from 3.3.0-13 to 3.3.0-14 - #3 by Nicolae

Steps I took leading up to the issue
Articles uploaded in PDF format lead to a HTTP 500 error.
Articles uploaded in HTML format work fine, and when the PDF Display plugin is disabled the PDF download correctly, confirming this is not a file directory error.

Perhaps worth noting is that Chrome and Edge display a file safety warning (“This file can’t be downloaded securely”) when downloading.
Firefox on the other hand does not display this error (and also doesn’t display a HTTP 500 error when the plugin is disabled, but a blank page)

I have also tried updating PDF.JS to the latest version available on their website both legacy and regular version, which did not alter the results.

What application are you using?
Currently using OJS 3.3.0.14 although I’ve tried up to 3.3.0.17 and the issue persists

Hi @toma,

Can you verify which PDF display plugin you mean?

For 500 errors it is ideal to see error output from the PHP error logs to see relevant error log messages from there. I know you said you don’t have access, but if you’re able to get the messages from a sys admin or someone else, that will be more helpful for troubleshooting.

There’s also this issue here: PDF files are not opening / downloading after server migration
Which was resolved by adjusting the files_dir config - something perhaps also worth looking at.

-Roger
PKP Team

Hi @rcgillis,

The name of the problematic plugin is PDF.JS PDF viewer
I have not migrated servers for years, and as I mentioned the PDF file downloads work perfectly when I disable the plugin, so the files_dir is set correctly.

The only PHP error log that I can see does not register any errors, but it may be that the log level is not set correctly.