Fix NPM+puppeteer disconnect error handling

main
Elbert Alias 5 years ago
parent d18b928dc4
commit 43faa23551

@ -54,6 +54,10 @@ class PuppeteerBrowser extends Browser {
throw new Error(error.message || error.toString()); throw new Error(error.message || error.toString());
} }
browser.on('disconnected', () => {
throw new Error('Disconnected');
});
try { try {
const page = await browser.newPage(); const page = await browser.newPage();
@ -61,6 +65,10 @@ class PuppeteerBrowser extends Browser {
await page.setRequestInterception(true); await page.setRequestInterception(true);
page.on('error', (error) => {
throw new Error(error.message || error.toString());
});
page.on('request', request => request.continue()); page.on('request', request => request.continue());
page.on('response', (response) => { page.on('response', (response) => {

@ -2,7 +2,7 @@
"name": "wappalyzer", "name": "wappalyzer",
"description": "Uncovers the technologies used on websites", "description": "Uncovers the technologies used on websites",
"homepage": "https://github.com/AliasIO/Wappalyzer", "homepage": "https://github.com/AliasIO/Wappalyzer",
"version": "5.9.7", "version": "5.9.10",
"author": "Elbert Alias", "author": "Elbert Alias",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {

Loading…
Cancel
Save