From e1552ae725c0aff498811907007bb366366bcf66 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Fri, 28 Apr 2023 11:42:27 -0600 Subject: [PATCH] Turn off webgl on puppeteer loading, see https://github.com/phetsims/aqua/issues/174 --- js/phet-io/generatePhetioMacroAPI.js | 5 ++++- js/scripts/hook-pre-commit-task.js | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/phet-io/generatePhetioMacroAPI.js b/js/phet-io/generatePhetioMacroAPI.js index 9465b299c..82a838f66 100644 --- a/js/phet-io/generatePhetioMacroAPI.js +++ b/js/phet-io/generatePhetioMacroAPI.js @@ -36,7 +36,10 @@ const generatePhetioMacroAPI = async ( repos, options ) => { return withServer( async port => { const browser = await puppeteer.launch( { - timeout: 120000 + timeout: 120000, + args: [ + '--disable-gpu' + ] } ); const chunks = _.chunk( repos, options.chunkSize ); diff --git a/js/scripts/hook-pre-commit-task.js b/js/scripts/hook-pre-commit-task.js index 92b4257fc..131bdc236 100644 --- a/js/scripts/hook-pre-commit-task.js +++ b/js/scripts/hook-pre-commit-task.js @@ -111,7 +111,11 @@ const repo = getArg( 'repo' ); return true; } else { - const browser = await puppeteer.launch(); + const browser = await puppeteer.launch( { + args: [ + '--disable-gpu' + ] + } ); const result = await withServer( async port => { return puppeteerQUnit( browser, `http://localhost:${port}/${testFilePath}?ea&brand=phet-io` );