PDF Generation : ERR_BLOCKED_BY_ORB
-
We are using JSReport to render PDF.
Our template includes the following scripts in the HTML header:
https://code.highcharts.com/highcharts.js
https://code.highcharts.com/highcharts-3d.js
https://code.highcharts.com/modules/accessibility.jsWhen rendering a PDF with JSReport:
In development: random errors occur:
Page request failed: GET (script) https://code.highcharts.com/highcharts-3d.js, failure: net::ERR_BLOCKED_BY_ORB
Page request failed: GET (script) https://code.highcharts.com/highcharts.js, failure: net::ERR_BLOCKED_BY_ORB
Page request failed: GET (script) https://code.highcharts.com/modules/accessibility.js, failure: net::ERR_BLOCKED_BY_ORBWe updated the chrome-pdf configuration in JSReport to disable certain security settings as follows:
"chrome-pdf": {
"timeout": 30000,
"launchOptions": {
"args": [
"--disable-web-security",
"--disable-features=IsolateOrigins,site-per-process,BlockInsecurePrivateNetworkRequests",
"--no-sandbox"
]
}
}
After this change, we started getting a new error:(console:error) Failed to load resource: the server responded with a status of 429 ()
Page request failed: GET (script) https://code.highcharts.com/highcharts.js, failure: net::ERR_ABORTED
It seems we are now being rate-limited by the remote server (HTTP 429 = too many requests).Have you encountered this kind of issue when generating PDFs?
Is there any recommended solution or configuration to avoid these errors?Thanks in advance for your help.
-
You have the following options...
Try to add also the--disable-site-isolation-trials
arg.
Try to use a different CDN like jsdeliver, cdnjs
Use a proxy
Download the minified lib and upload it as an jsreport asset.
Install it from npm, using npm extension for example, and use it with module helper