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.

Failed to launch chrome on Ubuntu 16.04 AWS EC2 Instance.

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 1.2
  • Platform / OS version: Ubuntu 16.04
  • URLs (if applicable):
  • Node.js version: 8.11.2

What steps will reproduce the problem?

Try to launch puppeteer via puppeteer.launch()

Please include code that reproduces the issue.

puppeteer.launch({ ignoreHTTPSErrors: true })

I’ve tried getting all dependencies required via the troubleshoot file but nothing works.

Error in totality:

Server started on port 8001
error Error: Failed to launch chrome!


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

at onClose (/home/ubuntu/project/node_modules/puppeteer/lib/Launcher.js:246:14)
at Interface.helper.addEventListener (/home/ubuntu/project/node_modules/puppeteer/lib/Launcher.js:235:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nuthinkingcommented, Jun 14, 2018

Similar error, I tried to pass also the path to the installed Chrome (/usr/bin/google-chrome). Note: I am not saying to ignore HTTPS errors and I have headless:false. All dependencies seem installed.

Error:

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


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

    at onClose (/home/paperspace/puppett/node_modules/puppeteer/lib/Launcher.js:285:14)
    at ChildProcess.helper.addEventListener (/home/paperspace/puppett/node_modules/puppeteer/lib/Launcher.js:275:60)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
(node:3538) 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:3538) [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.
0reactions
aslushnikovcommented, Nov 17, 2018

@solo-md the Raspberry Pi is not supported atm - we don’t have ARM build. See #550 on how to build one for yourself

Everybody else:

  • the first thing to do is to check that all required dependencies are installed; the list is available on troubleshooting.md.
  • next, locate Puppeteer’s bundled Chromium, it’s usually under node_modules/puppeteer/.local-chromium/linux-XXXXXX/chrome-linux/chrome. If there’s none - than we failed to download Chromium for you.
  • If there’s one, try running ldd <chromium> | grep not and see what’s missing.
  • Try running puppeteer with dumpio: true and check Chromium error log. It usually tells something about the root cause.

I hope this helps. If nothing helps, please feel free to file new bugs against us or upstream chromium (at https://crbug.com/new) with the excerpt of the chromium crash log.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to launch chromium headless using puppeteer on ...
When I try to run the same microservice on EC2 ubuntu 16.04 server, it is unable to launch chromium headless. I have used...
Read more >
Failed to launch chromium headless using puppeteer on ...
Coding example for the question Failed to launch chromium headless using puppeteer on Ubuntu 16.04 AWS EC2 Instance-node.js.
Read more >
After install Google Chrome in EC2 won't open from Ubuntu ...
xorg - After install Google Chrome in EC2 won't open from Ubuntu Server 14.04 LTS (HVM) command line - Ask Ubuntu.
Read more >
Resolve boot errors on Linux Nitro-based EC2 instances
I changed my Amazon Elastic Compute Cloud (Amazon EC2) Linux instance to a Nitro-based instance type, and now it doesn't boot.
Read more >
Running Ubuntu Desktop on an AWS EC2 instance
Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.
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