"Navigation Timeout Exceeded" error when setting headless flag to true, works with false.
See original GitHub issueSteps 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:
- Created 6 years ago
- Reactions:6
- Comments:12 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
me too…
me too…😭