Skip to content

Commit

Permalink
Allow configuring protocolTimeout for puppeteer driver via env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Jan 4, 2025
1 parent a0a50c2 commit 88b1795
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion browser/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export default function startPuppeteer({
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
headless: 'new',
protocolTimeout: TWENTY_DAYS,
protocolTimeout: process.env.PUPPETEER_PROTOCOL_TIMEOUT === undefined
? TWENTY_DAYS
: Number.parseInt(process.env.PUPPETEER_PROTOCOL_TIMEOUT, 10),
});
console.log(await browser.version());
const page = await browser.newPage();
Expand Down

0 comments on commit 88b1795

Please sign in to comment.