Problem Description
You have an application that used to run fine on v7x. When upgraded to v8x, you are getting 404 errors regarding missing chunks in a HAR trace. For example,
http://x.com:8080/aai/web/v1/_chunks/chunk.9622.js
http://x.com:8080/aai/web/v1/_chunks/chunk.2973.js
Explanation
The following is a description of a customer's rare corner case usage. If you are getting the same error with some other implementation, you might want to try this solution too. This type of issue can only be remedied by using the following publicPath syntax described below. It cannot be fixed in jasperserver code.
For this particular customer case, the application visualize.js code is generated from java code. In the generated script code, it is using iQuery.getScript function. When loading visualize.js script this way, it requires adding the publicPath property to the visaulize.js configuration. This is similar to when using CDN to host visualize.js. The reason being, jQuery when loading scripts dynamically does not add them to the DOM as a script tag. As a result, jasperserver cannot resolve the path to load the chunks. This is not the case before JRS 8.0.0 where visualize.js is loaded as one chunk. In v8.0.0, many chunks and maps are created and managed by webpack.
When using visualize.js in this unusual way or other ways, you must have something like the following in the script code instead of just the Url.
publicPath: jasperBaseUrl + '/visualize/scripts'
See section 1.7.2 for a full description of the usage under certain circumstances.
https://docs.tibco.com/pub/js-jrs/8.1.0/doc/pdf/TIB_js-jrs_8.1.0_Visualize.js-Guide.pdf
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now