From a805ebce80e8dab0557cd99ded9fe81f078bcca2 Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Thu, 19 Mar 2020 10:24:14 +1100 Subject: [PATCH] Fix error handling in NPM/Puppeteer --- src/apps.json | 4 +- src/drivers/npm/browsers/puppeteer.js | 26 +++-- .../webextension/_locales/en/messages.json | 98 +++++++++--------- src/icons/Intercom.png | Bin 540 -> 0 bytes src/icons/Intercom.svg | 1 + 5 files changed, 66 insertions(+), 63 deletions(-) delete mode 100644 src/icons/Intercom.png create mode 100644 src/icons/Intercom.svg diff --git a/src/apps.json b/src/apps.json index 565724d73..c827ee727 100644 --- a/src/apps.json +++ b/src/apps.json @@ -5133,7 +5133,7 @@ "cats": [ 10 ], - "icon": "Intercom.png", + "icon": "Intercom.svg", "js": { "Intercom": "" }, @@ -11394,7 +11394,7 @@ "script": [ "/_nuxt/" ], - "implies": "Vue.js", + "implies": ["Vue.js", "Node.js"], "website": "https://nuxtjs.org" }, "W3 Total Cache": { diff --git a/src/drivers/npm/browsers/puppeteer.js b/src/drivers/npm/browsers/puppeteer.js index 429700046..d9f3cbf0f 100644 --- a/src/drivers/npm/browsers/puppeteer.js +++ b/src/drivers/npm/browsers/puppeteer.js @@ -91,17 +91,21 @@ class PuppeteerBrowser extends Browser { let responseReceived = false; page.on('request', (request) => { - if ( - responseReceived - && request.isNavigationRequest() - && request.frame() === page.mainFrame() - && request.url() !== url - ) { - this.log(`abort navigation to ${request.url()}`); - - request.abort('aborted'); - } else { - request.continue(); + try { + if ( + responseReceived + && request.isNavigationRequest() + && request.frame() === page.mainFrame() + && request.url() !== url + ) { + this.log(`abort navigation to ${request.url()}`); + + request.abort('aborted'); + } else { + request.continue(); + } + } catch (error) { + reject(new Error(`page error: ${error.message || error}`)); } }); diff --git a/src/drivers/webextension/_locales/en/messages.json b/src/drivers/webextension/_locales/en/messages.json index 2ed0c5ef2..c2b6245c7 100644 --- a/src/drivers/webextension/_locales/en/messages.json +++ b/src/drivers/webextension/_locales/en/messages.json @@ -16,69 +16,67 @@ "termsContent": { "message": "This extension sends anonymous information about websites you visit, including domain name and identified technologies, to wappalyzer.com. This can be disabled in the settings." }, "privacyPolicy": { "message": "Privacy policy" }, "categoryName1": { "message": "CMS" }, - "categoryName2": { "message": "Message Board" }, - "categoryName3": { "message": "Database Manager" }, - "categoryName4": { "message": "Documentation Tool" }, - "categoryName5": { "message": "Widget" }, + "categoryName2": { "message": "Message boards" }, + "categoryName3": { "message": "Database managers" }, + "categoryName4": { "message": "Documentation tools" }, + "categoryName5": { "message": "Widgets" }, "categoryName6": { "message": "Ecommerce" }, - "categoryName7": { "message": "Photo Galleries" }, + "categoryName7": { "message": "Photo galleries" }, "categoryName8": { "message": "Wikis" }, - "categoryName9": { "message": "Hosting Panels" }, + "categoryName9": { "message": "Hosting panels" }, "categoryName10": { "message": "Analytics" }, - "categoryName11": { "message": "Blog" }, - "categoryName12": { "message": "JavaScript Framework" }, - "categoryName13": { "message": "Issue Tracker" }, - "categoryName14": { "message": "Video Player" }, - "categoryName15": { "message": "Comment System" }, - "categoryName16": { "message": "Captcha" }, - "categoryName17": { "message": "Font Script" }, - "categoryName18": { "message": "Web Framework" }, + "categoryName11": { "message": "Blogs" }, + "categoryName12": { "message": "JavaScript frameworks" }, + "categoryName13": { "message": "Issue trackers" }, + "categoryName14": { "message": "Video players" }, + "categoryName15": { "message": "Comment systems" }, + "categoryName16": { "message": "Captchas" }, + "categoryName17": { "message": "Font scripts" }, + "categoryName18": { "message": "Web frameworks" }, "categoryName19": { "message": "Miscellaneous" }, "categoryName20": { "message": "Editor" }, "categoryName21": { "message": "LMS" }, - "categoryName22": { "message": "Web Server" }, - "categoryName23": { "message": "Cache Tool" }, - "categoryName24": { "message": "Rich Text Editor" }, - "categoryName25": { "message": "JavaScript Graphics" }, - "categoryName26": { "message": "Mobile Framework" }, - "categoryName27": { "message": "Programming Language" }, - "categoryName28": { "message": "Operating System" }, - "categoryName29": { "message": "Search Engine" }, - "categoryName30": { "message": "Web Mail" }, + "categoryName22": { "message": "Web servers" }, + "categoryName23": { "message": "Caching" }, + "categoryName24": { "message": "Rich text editors" }, + "categoryName25": { "message": "JavaScript graphics" }, + "categoryName26": { "message": "Mobile frameworks" }, + "categoryName27": { "message": "Programming languages" }, + "categoryName28": { "message": "Operating systems" }, + "categoryName29": { "message": "Search engines" }, + "categoryName30": { "message": "Webmail" }, "categoryName31": { "message": "CDN" }, - "categoryName32": { "message": "Marketing Automation" }, - "categoryName33": { "message": "Web Server Extension" }, - "categoryName34": { "message": "Database" }, - "categoryName35": { "message": "Map" }, - "categoryName36": { "message": "Advertising Network" }, - "categoryName37": { "message": "Network Service" }, - "categoryName38": { "message": "Media Server" }, - "categoryName39": { "message": "Webcam" }, - "categoryName40": { "message": "Printer" }, - "categoryName41": { "message": "Payment Processor" }, - "categoryName42": { "message": "Tag Manager" }, - "categoryName43": { "message": "Paywall" }, - "categoryName44": { "message": "Build/CI System" }, - "categoryName45": { "message": "SCADA System" }, + "categoryName32": { "message": "Marketing automation" }, + "categoryName33": { "message": "Web server extensions" }, + "categoryName34": { "message": "Databases" }, + "categoryName35": { "message": "Maps" }, + "categoryName36": { "message": "Advertising" }, + "categoryName37": { "message": "Network services" }, + "categoryName38": { "message": "Media servers" }, + "categoryName39": { "message": "Webcams" }, + "categoryName40": { "message": "Printers" }, + "categoryName41": { "message": "Payment processors" }, + "categoryName42": { "message": "Tag managers" }, + "categoryName44": { "message": "CI" }, "categoryName46": { "message": "Remote Access" }, - "categoryName47": { "message": "Development Tool" }, - "categoryName48": { "message": "Network Storage" }, - "categoryName49": { "message": "Feed Readers" }, - "categoryName50": { "message": "Document Management Systems" }, - "categoryName51": { "message": "Landing Page Builder" }, - "categoryName52": { "message": "Live Chat" }, + "categoryName47": { "message": "Developmentl" }, + "categoryName48": { "message": "Network storage" }, + "categoryName49": { "message": "Feed readers" }, + "categoryName50": { "message": "DMS" }, + "categoryName51": { "message": "Page builder" }, + "categoryName52": { "message": "Live chat" }, "categoryName53": { "message": "CRM" }, "categoryName54": { "message": "SEO" }, "categoryName55": { "message": "Accounting" }, - "categoryName56": { "message": "Cryptominer" }, - "categoryName57": { "message": "Static Site Generator" }, - "categoryName58": { "message": "User Onboarding" }, - "categoryName59": { "message": "JavaScript Libraries" }, + "categoryName56": { "message": "Cryptominers" }, + "categoryName57": { "message": "Static site generators" }, + "categoryName58": { "message": "User onboarding" }, + "categoryName59": { "message": "JavaScript libraries" }, "categoryName60": { "message": "Containers" }, "categoryName61": { "message": "SaaS" }, "categoryName62": { "message": "PaaS" }, "categoryName63": { "message": "IaaS" }, - "categoryName64": { "message": "Reverse Proxy" }, - "categoryName65": { "message": "Load Balancer" }, - "categoryName66": { "message": "UI Frameworks" } + "categoryName64": { "message": "Reverse proxies" }, + "categoryName65": { "message": "Load balancers" }, + "categoryName66": { "message": "UI frameworks" } } diff --git a/src/icons/Intercom.png b/src/icons/Intercom.png deleted file mode 100644 index c6fe220c680cbca3d9dbdc6103eb6640d1054b83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmV+%0^|LOP){4(Hk)m1%U{G7Twqor8y}nBh;zG5gmet&gF75 z!7hWM&@-k*sIEjCY9c#({NA&j?QEsw2S48Dd*A1I`S_6BXU+OPgWnEloCnEB7GKf~ ze@&C+EU%@woJ{e<`cF&$%cBTuhgn=X$O1M?i!nqaVFborV02^{F9Va7jzuGgFGS(= zs%#_Tzepjx_M0<_9d`A4*?#Y#Me7}R$zAkpa#wlxXy>#H0bx#`M)27XOafT|Ci0b~ zditpk`q&8UoJImUh-_ADxjR^_1uctA6J{m@JEy^MY=3$0thr`4wF?!faJfzm+DAOD z%F4pB!V4OjZlbBZ`>#Ox67gJZxm6s@Y?F~x5pQUT{rWq$-S1<|-3RRG^|8&}XZ0Sv zd0*m{EW8Hk|4xRs$hlMzJ+VvOP$c&FN>%4fypoYD`d3L|K=C9=j;lfN2dQt6uQzju zmY&SSGmy^+g$2TO_aHmRBlLVsmzYFLuWMr7@;EaZfMfeVsxH&mR diff --git a/src/icons/Intercom.svg b/src/icons/Intercom.svg new file mode 100644 index 000000000..ebdeacc05 --- /dev/null +++ b/src/icons/Intercom.svg @@ -0,0 +1 @@ + \ No newline at end of file