Skip to content

Commit f097acd

Browse files
committed
Improve error handling by forwarding browser logs
1 parent 321f190 commit f097acd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graph-visualization/renderVisualizations.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const takeCanvasScreenshots = async (browser, htmlFilename) => {
6969
}
7070

7171
const page = await browser.newPage();
72+
page.on("requestfailed", (request) => console.log(`${request.failure().errorText} ${request.url()}`));
7273
await page.setViewport({ width: 1500, height: 1000, isMobile: false, isLandscape: true, hasTouch: false, deviceScaleFactor: 1 });
7374

7475
console.log(`Loading ${htmlFilename}`);
@@ -118,7 +119,7 @@ let browser;
118119
*/
119120
(async () => {
120121
console.log("renderVisualizations.js: Starting headless browser...");
121-
browser = await puppeteer.launch({ headless: "new" }); // { headless: false } for testing
122+
browser = await puppeteer.launch({ headless: "new", dumpio: true }); // { headless: false } for testing
122123

123124
// Get all *.html files in this (script) directory and its subdirectories
124125
// The separate filter is needed to ignore the "node_modules" directory.

0 commit comments

Comments
 (0)