puppeteer: Win10 x64 always throws timeout

Hey guys, i’m stucked into a problem.

const browser = await puppeteer.launch({ headless: false });

Chromium open but, always throws timeout exception:

TimeoutError: Timed out after 120000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r579032 at Timeout.onTimeout (C:\git\view-render\node_modules\puppeteer\lib\Launcher.js:310:14) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I have debug the launcher.js today, found that timeout was happened on waitForWSEndpoint,

 const rl = readline.createInterface({ input: chromeProcess.stderr });
    let stderr = '';
    const listeners = [
      helper.addEventListener(rl, 'line', onLine),
      helper.addEventListener(rl, 'close', () => onClose()),
      helper.addEventListener(chromeProcess, 'exit', () => onClose()),
      helper.addEventListener(chromeProcess, 'error', error => onClose(error))
    ];
    const timeoutId = timeout ? setTimeout(onTimeout, timeout) : 0; // timeout here for onLine never called

Could you please deep check here why onLine is never called. @aslushnikov

edit: seems that in the readline.js input(chromeProcess.stderr) doesn’t emit end correct

chromeProcess.connected is false after spawn. Here is some doc from nodejs.org.

The subprocess.connected property indicates whether it is still possible to send and receive messages from a child process. When subprocess.connected is false, it is no longer possible to send or receive messages.

Got the same error. Chromium is launched with blank page, and nothing happened until timeout error emitted after 30 seconds.And then, chromium will be auto closed.

node version: v10.11.0 pptr version: 1.8.0 / 1.9.0 win10 version: 1803 / 17134.167

demo script:

(async () => {
  try {
    const browser = await puppeteer.launch()
    const page = await browser.newPage()
    await page.goto('https://www.google.com')

    await browser.close()
  } catch (e) {
    console.log(e)
  }
})()

error message:

{ TimeoutError: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r588429
    at Timeout.onTimeout (D:\code\path\to\projAddr\node_modules\puppeteer\lib\Launcher.js:344:14)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10) name: 'TimeoutError' }

I found several similar issues for timeout on win10x64, maybe it should be written in /docs/troubleshooting.md