question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeoutError: Timed out after 30000 ms while trying to connect to Chrome!

See original GitHub issue

Hello

I try to implement/deploy puppeteer on Google Cloud but I have some issues. What I don’t understand, it worked well 2 days ago. Since then, I have this error:

TimeoutError: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r674921 at Timeout.onTimeout

I ran this command and everything seems fine : DEBUG=* node app.js

Version puppeteer : ^1.19.0 Version Node : v8.11.3

And here the code:

`async function main_screenshot(project_id) { try { const browser = await puppeteer.launch({ headless: true, args: [“–window-size=1440,1000”, “–no-sandbox”, “–disable-setuid-sandbox”, “–disable-gpu”] }); // const browser = await puppeteer.launch({dumpio: true}); const page = await browser.newPage() page.setUserAgent(‘Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36’) page.setViewport({ width: 1440, height: 721 }) console.log(‘entering in screenshot zone’) page.setDefaultNavigationTimeout(30000) await page.goto(‘https://app.slack.com/client/TLW4JE7AA/CLTFQT9GC’) await page.waitFor(3000) await page.type(‘#email’, process.env.SLACK_EMAIL) await page.type(‘#password’, process.env.SLACK_PWD) await page.waitFor(3000) await page.click(‘#signin_btn’) console.log(‘credentials done’) await page.waitFor(3000) console.log(‘so?’) await page.goto(‘https://app.slack.com/client/TLW4JE7AA/CLTFQT9GC’) await page.waitFor(3000) console.log(‘connected to the right environment’) const div = await page.$$(‘.c-message.c-message–light’) var nuwwmber_loop= 0 for (var i = div.length ; i > 0; i–) { var text = await (await div[i - 1].getProperty(‘textContent’)).jsonValue();

  if(text.includes(project_id)) {
    number_loop = i
    break
  }
}
// const text = await (await div.getProperty('textContent')).jsonValue();


 const shotResult = await div[number_loop-1].screenshot();
console.log(shotResult)
cloudinaryOptions = {
  public_id: `${project_id}`
}

const results = await uploadToCloudinary(shotResult, cloudinaryOptions)
console.log(results)
browser.close()
return results

} catch (e) { console.log(e) } }`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:112

github_iconTop GitHub Comments

49reactions
dctscommented, Sep 28, 2020

@mathiasbynens I belive this should be reopened, still a lot of people seem to have this error.

24reactions
tbadlovcommented, Sep 26, 2019

If it helps anyone my issue with was due to the usage of Puppeteer in Google Cloud Function and have it running in the background. I changed the function to respond only after Puppeteer is done and it worked just fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(puppeteer) Timed out after 30000 ms while trying to connect ...
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:...
Read more >
Firebase puppeteer PDF function times out due to Chrome ...
The function works, when I deploy it locally under MacOS. TimeoutError: Timed out after 30000 ms while trying to connect to the browser!...
Read more >
How to solve Puppeteer TimeoutError: Navigation timeout of ...
How to solve Puppeteer TimeoutError: Navigation timeout of 30000 ms exceeded · A. Globally on the tab · B. Specifically on the current...
Read more >
Puppeteer timeout - Coding Help - Glitch Support
Anyone knows how to solve this puppeteer timeout error? TimeoutError: Timed out after 30000 ms while trying to connect to the browser!
Read more >
Puppeteer: Timed out after 30000 ms while trying to... | Fórum
TimeoutError : Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r818858 is guaranteed to work....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found