Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to launch chrome on Ubuntu 16.04 AWS EC2 Instance. #2663

Closed
dilizarov opened this issue Jun 1, 2018 · 5 comments
Closed

Failed to launch chrome on Ubuntu 16.04 AWS EC2 Instance. #2663

dilizarov opened this issue Jun 1, 2018 · 5 comments

Comments

@dilizarov
Copy link

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)
@zhuozhongcao
Copy link

I have the same problem.

@nuthinking
Copy link

nuthinking commented 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.

@Bungeetech
Copy link

We are also facing this issue:

`Error: Failed to launch chrome!

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

at onClose (/home/chdin/Bungee-ASDF/node_modules/puppeteer/lib/Launcher.js:255:14)
at Interface.helper.addEventListener (/home/chdin/Bungee-ASDF/node_modules/puppeteer/lib/Launcher.js:244: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)`

@solo-md
Copy link

solo-md commented Jun 25, 2018

Decided to switch from PhantomJS to Puppeteer on my Raspberry Pi.
On macOS everything works fine, but on the raspberry I have this error.

puppeteer.launch({ ignoreHTTPSErrors: true }); // latest raspbian, nodejs and puppeteer

@aslushnikov
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants