Puppeteer fails to connect to Chromium on Windows 10
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.11.0
- Platform / OS version: Windows 10 1709
- URLs (if applicable):
- Node.js version: 10.x.x as well as 11.4.0
What steps will reproduce the problem?
const puppeteer = require("puppeteer");
puppeteer.launch();
What is the expected result? A headless browser launching in the background and no console error.
What happens instead? chrome.exe is run without any command line switch, opening a non-headless window and eventually the tab also crashes, until it is killed by Puppeteer.
(node:27296) UnhandledPromiseRejectionWarning: TimeoutError: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r609904
at Timeout.onTimeout (C:\Projects\foo\node_modules\puppeteer\lib\Launcher.js:353:14)
at listOnTimeout (timers.js:324:15)
at processTimers (timers.js:268:5)
(node:27296) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:27296) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I added console.log(chromeArguments)
in Launcher.js just before it spawn
s the Chromium process -
[ '--disable-background-networking',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-default-apps',
'--disable-dev-shm-usage',
'--disable-extensions',
'--disable-features=site-per-process',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',
'--disable-popup-blocking',
'--disable-prompt-on-repost',
'--disable-renderer-backgrounding',
'--disable-sync',
'--disable-translate',
'--metrics-recording-only',
'--no-first-run',
'--safebrowsing-disable-auto-update',
'--enable-automation',
'--password-store=basic',
'--use-mock-keychain',
'--headless',
'--hide-scrollbars',
'--mute-audio',
'--disable-gpu',
'about:blank',
'--remote-debugging-port=0',
'--user-data-dir=C:\\Users\\foobaz\\AppData\\Local\\Temp\\puppeteer_dev_profile-tW27Rg' ]
Something makes Node.js ignore the arguments. There is no existing chrome.exe (of Chromium) active, only chrome.exe of Chrome.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Puppeteer fails to connect to Chromium on Windows 10
A headless browser launching in the background and no console error. What happens instead? chrome.exe is run without any command line switch, ...
Read more >Puppeteer - npm
Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol.
Read more >Puppeteer overview - Microsoft Edge Development
The Puppeteer library provides a high-level API to control Chromium-based browsers, including Microsoft Edge, by using the DevTools Protocol.
Read more >Puppeteer documentation - DevDocs
js script that downloads headless_shell instead of Chromium to save disk space. you're bundling Puppeteer to use in Chrome Extension / browser with...
Read more >Error while launching headless browser using puppeteer.
Josh Greig whenever I do that It says to install chromium snap but when I proceed to do so I get error error:...
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
Hi everyone, I’m facing the same issue. The solution provided by Phistuck doesn’t work for me.
I found the culprit.
--disable-extensions
is forbidden in my corporate environment. That was stupid (the extensions it mandates are not security sensitive or protective or enforcing anything).puppeteer.launch({ignoreDefaultArgs: ['--disable-extensions']})
fixes it, until the next error…