You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading from version 2.1.266 to version 2.4.456, I noticed that the errors thrown from getDocument were undefined in the event of a bad URL, where they used to come in as MissingPDFException, for example. I suspect the problem is also present on 2.5.207 and was introduced in 2.3.200.
I believe the source of the problem is due to the fact that reflection is now being used by BaseException and the code I'm using is minified, so the names of the classes are being changed. The problem was likely introduced in this commit with this line of code:
I primarily use pdfjs-dist and have up until recently loaded the minified worker.
When upgrading from version 2.1.266 to version 2.4.456, I noticed that the errors thrown from
getDocument
wereundefined
in the event of a bad URL, where they used to come in asMissingPDFException
, for example. I suspect the problem is also present on 2.5.207 and was introduced in 2.3.200.I believe the source of the problem is due to the fact that reflection is now being used by
BaseException
and the code I'm using is minified, so the names of the classes are being changed. The problem was likely introduced in this commit with this line of code:5d93fda#diff-8d2b578d58d4d8c8a2975020fbbc84d9R410
This causes problems when trying to deserialize the exception when passed from the worker as this switch statement results in
undefined
:pdf.js/src/display/api.js
Lines 2255 to 2281 in 1a6816b
In the case of the minified file one can see that
ex
will come through as an object that looks like:Which does not match the string values in the switch, which will never be minified themselves because they are string literals.
The text was updated successfully, but these errors were encountered: