From 76eb2ee897931e49cc2e10de97404f684222260d Mon Sep 17 00:00:00 2001 From: Lee Teague Date: Thu, 25 Mar 2021 16:23:25 -0400 Subject: [PATCH] Disable web security to avoid invalid CORS errors https://stackoverflow.com/questions/52129649/puppeteer-cors-mistake https://github.com/puppeteer/puppeteer/issues/4889 --- src/main/comparisonJob.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/comparisonJob.js b/src/main/comparisonJob.js index f3ba072..7e82e52 100644 --- a/src/main/comparisonJob.js +++ b/src/main/comparisonJob.js @@ -175,12 +175,14 @@ async function openBrowser(messageCallback) { ] */ + const chromeArgs = ['--disable-web-security'] + return await puppeteer.launch({ headless: isChromiumHeadless(), slowMo: false, defaultViewport: null, ignoreHTTPSErrors: true, - // args: chromeArgs, + args: chromeArgs, ...chromiumPathOptions }) }