puppeteer: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!
Minimal, reproducible example
const browser = await puppeteer.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
Error string
Error: Timed out while waiting for the WS endpoint URL
Bug behavior
- Flaky
Background
Using it inside docker image. Platform / OS version: Rocky Linux 8 running on GCP
I have tried multiple things
- running
node node_modules/puppeteer/install.js
manually inside docker image. - verify all the dependencies are present for chrome with the help of
ldd chrome
Expectation
Get the browser instance
Reality
It throws error
TimeoutError: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!
at ChromeLauncher.launch (/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:153:23)
Puppeteer version
20.8.2
Node version
18.16.0
Package manager
npm
Package manager version
9.5.1
Operating system
Linux
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 14
- Comments: 20 (1 by maintainers)
Adding timeout while launching the puppeteer will solve this issue. Try adding
timeout:0
in launch options.is anyone can find solution ?
Same issue, however, I will note that adding
timeout: 0
as @rohinthr suggested, seems to solve it so far, however, I still need to do more testing to confirm.On
puppeteer v 21.1.1
. Using google cloud function gen2onObjectFinalized
trigger with 16GiB memory, 4 cpu, and 120 second timeout.On first, and intermittently on subsequent runs of this Cloud Storage trigger function, I am getting
TimeoutError: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!
. So, this is still very much an issue and unless someone can point out in my code something I’m missing, I am waiting for the browser to close before the function completes, etc.In
package.json
I had to add:And then at root of project I added the
.puppeteerrc.cjs config file
:Puppeteer code: