From bcbe2624f93bab807b8d97bf8f2fb2c06db38849 Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Thu, 20 Jun 2019 12:14:19 +1000 Subject: [PATCH] fix(release-check): bypass win32 puppeteer error on 0.0.0.0 --- build/tasks/release-checks/tasks/check-javascript-errors.js | 3 ++- build/tasks/release-checks/tasks/take-screenshot-of-page.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/tasks/release-checks/tasks/check-javascript-errors.js b/build/tasks/release-checks/tasks/check-javascript-errors.js index b501dec38..2f236b4ff 100644 --- a/build/tasks/release-checks/tasks/check-javascript-errors.js +++ b/build/tasks/release-checks/tasks/check-javascript-errors.js @@ -7,7 +7,8 @@ module.exports = class CheckJavascriptErrors extends Task { constructor(url) { super('Check javascript errors'); - this.url = url; + // somehow puppeteer/win32 thinks http://0.0.0.0:5000 is an invalid address. + this.url = url.replace('//0.0.0.0', '//localhost'); } execute() { diff --git a/build/tasks/release-checks/tasks/take-screenshot-of-page.js b/build/tasks/release-checks/tasks/take-screenshot-of-page.js index 2d9e3132a..b34e8ddd8 100644 --- a/build/tasks/release-checks/tasks/take-screenshot-of-page.js +++ b/build/tasks/release-checks/tasks/take-screenshot-of-page.js @@ -7,7 +7,8 @@ module.exports = class TakeScreenShotOfPage extends Task { constructor(url, path) { super('Take screenshot of page'); - this.url = url; + // somehow puppeteer/win32 thinks http://0.0.0.0:5000 is an invalid address. + this.url = url.replace('//0.0.0.0', '//localhost'); this.path = path; }