Headless mode on Windows 7 causes timeout, never completes
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.3.0
- Platform / OS version: Windows 7 x64
- URLs (if applicable):
- Node.js version: 8.9.4
What steps will reproduce the problem?
const puppeteer = require('puppeteer')
const devices = require('puppeteer/DeviceDescriptors')
const captureScreenshot = async () => {
const browser = await puppeteer.launch({headless:true})
const page = await browser.newPage()
await page.goto('https://www.google.com/')
await page.screenshot({path: 'screenshot.png', fullPage: true})
await browser.close()
}
captureScreenshot()
- npm install puppeteer
- node index.js
What is the expected result? Script runs and outputs screenshot.png into working directory.
What happens instead? Script runs for a long time until it produces timeout warnings.
(node:4492) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error: Navigation Timeout Exceeded: 30000ms exceeded
(node:4492) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
If puppeteer.launch option “headless” is set to false, same script delivers expected result in about 5 seconds.
Capturing screenshot from http://info.cern.ch/ works in headless mode, so issue might be related to complexity of the page.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Timeout Error occurred When run a script on Headless ...
I was having a similar problem, normal Chrome driver worked fine, but headless chrome always timed out. I found out that for responsive...
Read more >Group Policy Screensaver setting isn't working in Windows
Cause. The default ScreenSaver Timeout is configured in the registry at this location: Registry subkey: HKEY_CURRENT_USER\Control Panel\Desktop.
Read more >Reference Topics :: NVIDIA Nsight VSE Documentation
TDR stands for Timeout Detection and Recovery. ... TCC mode disables Windows graphics and is used in headless configurations, whereas WDDM ...
Read more >Getting Started with Headless Chrome - Chrome Developers
The easiest way to get started with headless mode is to open the Chrome binary from the command line. If you've got Chrome...
Read more >List of Chromium Command Line Switches - Peter Beverloo
Note: # must always be in [1, 8]; otherwise it is ignored by the Windows ... the browser process launched in background mode...
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 FreeTop 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
Top GitHub Comments
Does this work?
@joshas It shouldn’t be… but I’ve ran into serious problems with this too. I’ve added this comment to my code for those arguments: