Skip to content
Sign upLog in
← Back to Community

(puppeteer) Timed out after 30000 ms while trying to connect to the browser

Profile icon
mirzabhakti

I'm trying to make an api to purchase an item on a website. I'm currently using puppeteer v5.5.0, I was able to make this works, but after restarting the project i always got this error:

TimeoutError: Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r818858 is guaranteed to work.

Also, i was able to fix this issue by forking the project. But still the 2nd time i start the project the error still pops up

Answered by RYANTADIPARTHI [earned 5 cycles]
View Answer
Voters
Profile icon
mirzabhakti
Comments
hotnewtop
Profile icon
RYANTADIPARTHI

seems like it is taking too long. copy and paste all your code to another repl, or shorten your code. try either one of them.

Profile icon
mirzabhakti

seems like it is taking too long.

I think this is the main issue. I managed to fix this by moving this code:

const xcsrftoken = await getxcsrftoken(); const cookies = JSON.parse(process.env.cookies);

above browser.launch() and then the error is gone. thanks for the help

Profile icon
RYANTADIPARTHI

@mirzabhakti
np :)