From 6f8678c4a6d7c0fc1fcd70d253f5d3c0da38641f Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Thu, 27 Feb 2020 16:40:41 +1100 Subject: [PATCH] Fix NPM/Puppeteer error handling --- src/drivers/npm/browsers/puppeteer.js | 6 +----- src/drivers/npm/package.json | 2 +- src/drivers/webextension/manifest.json | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/drivers/npm/browsers/puppeteer.js b/src/drivers/npm/browsers/puppeteer.js index ecde8faff..d5bacd73e 100644 --- a/src/drivers/npm/browsers/puppeteer.js +++ b/src/drivers/npm/browsers/puppeteer.js @@ -116,11 +116,7 @@ class PuppeteerBrowser extends Browser { await Promise.race([ page.goto(url, { waitUntil: 'domcontentloaded' }), - new Promise(_resolve => setTimeout(() => { - this.log('timeout', 'error'); - - _resolve(); - }, this.options.maxWait)), + new Promise((_resolve, _reject) => setTimeout(() => _reject(new Error('timeout')), this.options.maxWait)), ]); // eslint-disable-next-line no-undef diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index 997407d48..05b8482cb 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -2,7 +2,7 @@ "name": "wappalyzer", "description": "Uncovers the technologies used on websites", "homepage": "https://github.com/AliasIO/Wappalyzer", - "version": "5.9.23", + "version": "5.9.24", "author": "Elbert Alias", "license": "GPL-3.0", "repository": { diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.json index 5d41a72c6..226dc671a 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.json @@ -4,7 +4,7 @@ "author": "Elbert Alias", "homepage_url": "https://www.wappalyzer.com", "description": "Identify web technologies", - "version": "5.9.23", + "version": "5.9.24", "default_locale": "en", "manifest_version": 2, "icons": {