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