@PDFTron/BlackBoxpartRetriever.chunk.js generated with incorrect numbers

CoreControls.js version - 6.4.0.26

Hi,

We have a web application where we use pdftron to display pdf files.

We are getting an exception when webviewer tries to display the pdf files as below:
CoreControls.js?v=6.4.0.26:42 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘call’)
at h (CoreControls.js?v=6.4.0.26:42:348)

The exception is thrown at line :-
ha[f].call(e.exports, e, e.exports, h);

After an investigation we found, when f is 386, it tries to call a method in BlackBoxPartRetriever.chunk.js. But inside the file BlackBoxPartRetriever.chunk.js, there is no case statement 386.Instead it contains case with 385. Because of this, it never access any case statement here. Since, ha[f] is never initialized with 386, it throws exception on ha[f].call(e.exports, e, e.exports, h);

The concerned code block of BlackBoxPartRetriever is as below:

/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function() {
(window.wpCoreControlsBundle = window.wpCoreControlsBundle || []).push([[6], {
385: function(ha, ca, h) {
function ba(e, h, r) {
h.endsWith(“/”) || (h += “/”);
r = r || {};
var w = r.disableWebsockets || !1;
this.yT = r.singleServerMode || !1;
null != r.customQueryParameters && Object(n.b)(“wvsQueryParameters”,

The same branch is deployed in another environment where it works fine with BlackBoxPartRetriever.chunk.js having correct number (386) in it.

The server code all have correct numbers (386) and it works fine locally too.

Could you please help with what might be the possible reason behind the issue in the concerned environment and how could we resolve it.

Please let me know if you need any thing from my side.

Thanks
Niraj

Hi there,

Could you please share the PDF files used to reproduce this error?
Are you able to reproduce this on our showcase?

If you are unable to reproduce, then the issue is likely fixed in the newer versions.
If you are still using CoreControls namespace, you are using a relatively older version of WebViewer. Please see our migration guide and update whenever possible:
Migrating-to-v8 | Apryse Documentation

Best regards,
Kevin Kim

Hi KKim,

Thanks for the reply.

Please find the PDF file attached.
Spink, Moyer 2011 - Defining the public health threat (1) (1).pdf (156.6 KB)

I am not able to reproduce this on showcase.
The version of WebViwer is 7.3.6.

We are not planning to migrate the WebViewer anytime soon. Is there anyway to make sure if the file BlackBoxPartRetriever can be generated correctly or updated or replaced with corrected one.

Thanks
Niraj

Hi there,

It looks like the error BlackBoxpartRetriever.chunk.js would be coming from our WebViewer Server. This issue is not reproducible on our WebViewer Server sample: https://docs.apryse.com/samples/web/samples/viewing/viewing-with-webviewer-server/

We recommend you to update to a relatively newer version of WebViewer & WebViewer Server as we do not port fixes backwards. Please see the change logs here on the issues that would be fixed:

Best regards,
Kevin Kim