From 74253d1e58f6e9f68b2c51e33866f9b1389171d2 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 27 Apr 2020 16:06:59 +0100 Subject: [PATCH] Work around issue with Node v14 and Puppeteer Use the system version of Chrome if the developer has Node v14 installed, to work around an upstream issue with Puppeteer (see code comment). --- src/karma.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/karma.config.js b/src/karma.config.js index 25afe032294..0d21676df97 100644 --- a/src/karma.config.js +++ b/src/karma.config.js @@ -7,7 +7,15 @@ const envify = require('loose-envify/custom'); const glob = require('glob'); let chromeFlags = []; -process.env.CHROME_BIN = require('puppeteer').executablePath(); + +if (process.version.startsWith('v14.')) { + // See https://github.com/puppeteer/puppeteer/issues/5719 + console.warn( + 'Using system Chrome instead of Puppeteer due to issue with Node 14' + ); +} else { + process.env.CHROME_BIN = require('puppeteer').executablePath(); +} // On Travis and in Docker, the tests run as root, so the sandbox must be // disabled.