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.

Non-headless Chrome will not launch

See original GitHub issue

Chrome will not launch when headless:false. Not specifying the headless property (i.e. default of headless:true) works.

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 0.12.0
  • Platform / OS version: Ubuntu 16.04.2 LTS
  • URLs (if applicable): N/A
  • Node.js version: v8.9.0

What steps will reproduce the problem?

const browser = await puppeteer.launch({headless:false, args:['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();

What is the expected result?

Chrome launches and opens a new page.

What happens instead?

After first attempt to launch Chrome:

(node:18427) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: kill ESRCH
(node:18427) [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.

After second attempt to launch Chrome:

(node:18427) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to launch chrome!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

26reactions
minhle2994commented, Jan 28, 2018

I have exactly the same issue. Any update?

8reactions
alexeymatveevpcommented, Aug 7, 2018

I’ve installed all libraries in https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

and still i’m having

(node:35) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!


TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/node_modules/puppeteer/lib/Launcher.js:285:14)
    at ChildProcess.helper.addEventListener (/node_modules/puppeteer/lib/Launcher.js:275:60)
    at ChildProcess.emit (events.js:187:15)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
(node:35) 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:35) [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.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Headless Chrome does not start - Stack Overflow
1 Answer 1 · 1. Does not work for me. · post the outpout of running it with --verbose or just paste the...
Read more >
Flags don't work when running headless? - Google Groups
Most prefs flags are not implemented in headless Chrome. If your test needs prefs flags, most likely you'll need to run it with...
Read more >
Getting Started with Headless Chrome - Chrome Developers
No. Headless Chrome doesn't use a window so a display server like Xvfb is no longer needed. You can happily run your automated...
Read more >
Windows Authentication does not work in headless mode
when using chrome 77 with --headless on windows against certain SPNEGO authenticated services. Reverting to chrome 71 (npm install chromedriver@2.46.0 puppeteer ...
Read more >
How to run Chrome headless in Selenium - automateNow
Running tests will not require an open browser window. ... Headless means that your tests will run without opening the Chrome browser.
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