-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Hi !
I found a weird bug : this error, that occurs in a timeout is not catchable with a try/catch clause around puppeteer.launch.
let browser
try {
browser = await puppeteer.launch({ ...opts })
}
catch(e)
{
browser = await puppeteer.connect({ ...ws })
}deno-puppeteer/src/deno/BrowserRunner.ts
Lines 163 to 165 in 45b3162
| throw new TimeoutError( | |
| `Timed out after ${timeout} ms while trying to connect to the browser! Only Chrome at revision r${preferredRevision} is guaranteed to work.`, | |
| ); |
This occurs while trying to launch a browser / user-data-dir couple a second time, chrome won't open a new instance but instead open a new page on the existing browser instance, and though don't output to stdout the ws endpoint as usual...
The try / catch in fact work as expected, and connects to the instance instead in this case, but the sub task (out of scope) launch that failed will crash the process after 30s timeout not connecting... even if it was expicitely used in a try clause...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels