Skip to content

Commit

Permalink
fix(wappalyzer): make a difference between the "maxWait" for puppetee…
Browse files Browse the repository at this point in the history
…r and the one to observe wappalyzer promises that can be slowed down due to concurrency (we increase the first one)
  • Loading branch information
sneko committed Mar 17, 2024
1 parent 958e04e commit f3bd4ad
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions patches/wappalyzer+6.10.66.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/wappalyzer/driver.js b/node_modules/wappalyzer/driver.js
index abfbcad..0329564 100644
index abfbcad..2823d30 100644
--- a/node_modules/wappalyzer/driver.js
+++ b/node_modules/wappalyzer/driver.js
@@ -16,7 +16,7 @@ const chromiumArgs = CHROMIUM_ARGS
Expand Down Expand Up @@ -56,15 +56,15 @@ index abfbcad..0329564 100644
ignoreHTTPSErrors: true,
acceptInsecureCerts: true,
args: chromiumArgs,
@@ -776,7 +807,7 @@ class Site {
}

// HTML
- let html = await this.promiseTimeout(page.content(), '', 'Timeout (html)')
+ let html = await this.promiseTimeout(page.content(), '', 'Timeout (html)', 4 * this.options.maxWait)
@@ -543,7 +574,7 @@ class Site {
errorMessage = 'Operation took too long to complete',
maxWait = this.options.fast
? Math.min(this.options.maxWait, 2000)
- : this.options.maxWait
+ : (4 * this.options.maxWait) // Increasing the default timeout since async processes in JavaScript will take longer than usual since we use concurrency (the real `maxWait` is only meaningful when talking to Puppeteer)
) {
let timeout = null

if (this.options.htmlMaxCols && this.options.htmlMaxRows) {
const batches = []
@@ -1088,21 +1119,26 @@ class Site {

let page
Expand Down

0 comments on commit f3bd4ad

Please sign in to comment.