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

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 0.10.1
  • Platform / OS version: Ubutntu 16.04 running on AWS EC2
  • URLs (if applicable):

What steps will reproduce the problem? Try the demo code to launch puppeteer in ubuntu 16.04 EC2 amazon AWS.

Code used:

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

What is the expected result?

It is able to start in my local. When I deployed in my EC2 I am getting this error. Couldn’t find a past issue related to this.

What happens instead? It throws error

(node:15966) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Error occured Error: Failed to launch chrome!
/home/ubuntu/ranker-backend/node_modules/puppeteer/.local-chromium/linux-496140/chrome-linux/chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:102
  • Comments:41 (6 by maintainers)

github_iconTop GitHub Comments

100reactions
JoelEinbindercommented, Sep 17, 2017

It looks like you are missing some Debian dependencies: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

52reactions
DdannyBcommented, Nov 7, 2018

Im using puppeteer nugetpackage 1.9.0. I also had the same issue that browser couldn’t launch in my linux container. I added this line in my dockerfile and it fixed the problem for me:

apt-get install -y wget unzip fontconfig locales gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

reference: https://hub.docker.com/r/browserless/chrome/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't Use Puppeteer -- Error: Failed to launch chrome
If you encounter E: Unable to locate package errors, run sudo apt-get update . ... under Chrome headless doesn't launch on UNIX you...
Read more >
Troubleshooting - Puppeteer
Chrome is downloaded but fails to launch on Node.js 14​. If you get an error that looks like this when trying to launch...
Read more >
Internal browser error: Failed to launch the browser process!
Internal browser error : Failed to launch the browser process!
Read more >
Why won't Google Chrome Enterprise launch? It just gives me ...
It just gives me an error message. It says "Launching Chrome..." and then says "Couldn't launch Chrome. Try again." How can I fix...
Read more >
puppeteer on Chrome! - Google Groups
localhost /usr/local/lib/node_modules/puppeteer # node test.js (node:19830) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
Read more >

github_iconTop Related Medium Post

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 Hashnode Post

No results found