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.

"Navigation Timeout Exceeded" error when setting headless flag to true, works with false.

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 1.1.1
  • Platform / OS version: Windows 7 SP 1
  • URLs (if applicable): www.google.com
  • Node.js version: 8.9.4

What steps will reproduce the problem?

const puppeteer = require('puppeteer');

(async function test() {
  try {
    const browser = await puppeteer.launch({ headless: true });
    const page = await browser.newPage();
  
    await page.goto('https://www.google.com', { waitUntil: 'networkidle2' });
    await page.screenshot({ path: 'screenshots/google.jpg' });
  
    browser.close();
  } catch(error) {
    console.log('\n\nERROR:\n', error, '\n\n');
  }
})();

Setting { headless: false } in puppeteer.launch options seems to work fine, but a browser instance is created, and this is not the desired result.

What is the expected result? Chrome to run in headless mode and capture screenshot of Google landing page.

What happens instead? Receive an error:

ERROR:
 Error: Navigation Timeout Exceeded: 30000ms exceeded
    at Promise.then (C:\Users\DevUser1\Dev\HeadlessChromeTest\node_modules\puppeteer\lib\NavigatorWatcher.js:71:21)
    at <anonymous>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
hexadcommented, May 5, 2018

me too…

2reactions
vovachka21commented, Nov 22, 2018

me too…😭

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Navigation Timeout Exceeded" error when setting headless ...
Setting { headless: false } in puppeteer.launch options seems to work fine, but a browser instance is created, and this is not the...
Read more >
Puppeteer keeps getting TimeoutError: Navigation timeout of ...
If you are not sure what causes a timeout you should set headless: false so you can see on the UI what goes...
Read more >
How to solve Puppeteer TimeoutError: Navigation timeout of ...
During the automation of multiple tasks on my job and personal projects, i decided to move on Puppeteer instead of the old school...
Read more >
API Reference — Pyppeteer 0.0.25 documentation
there's an SSL error (e.g. in case of self-signed certificates); target URL is invalid; the timeout is exceeded during navigation; then main resource...
Read more >
Error Messages | Cypress Documentation
When Cypress is installed, it unzips to the designated cache location on your computer. This error means that Cypress detected that it has...
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