Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Puppeteer reports Failed to launch chrome! on an Ubuntu 16.04 EC2 instance, do not assume one universal fix. That message is a wrapper-level symptom. First capture Chromium’s full stderr, identify the exact browser binary, and then follow the branch that matches the native error: a missing shared library, an unusable sandbox, a bad executable path, or a display-server problem.

The title-matching report (opened June 1, 2018) used Puppeteer 1.2, Node.js 8.11.2 and puppeteer.launch({ ignoreHTTPSErrors: true }), but did not include the Chromium stderr needed to prove a cause. A separate Ubuntu 16.04 EC2 report (Puppeteer 0.10.1, opened September 17, 2017) did show libpangocairo-1.0.so.0: cannot open shared object file. That is a real example of this failure class, not proof that it explains every launch error.

1. Capture the native error before changing the server

Start with a minimal script and log the complete exception. Puppeteer’s short message is not enough to distinguish a dynamic-loader failure from a sandbox or display failure.

const puppeteer = require('puppeteer');

(async () => {
  try {
    const browser = await puppeteer.launch({
      headless: true,
      dumpio: true,
      ignoreHTTPSErrors: true
    });
    const page = await browser.newPage();
    await page.goto('https://example.com', {waitUntil: 'networkidle2'});
    console.log(await page.title());
    await browser.close();
  } catch (error) {
    console.error('Puppeteer launch failed:', error.stack || error);
    process.exitCode = 1;
  }
})();

dumpio: true forwards the browser process output to the terminal. Run the test as the same Linux user, with the same working directory, environment variables and launch arguments used by your application. Record these values alongside the error:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
  • node --version
  • npm ls puppeteer puppeteer-core
  • cat /etc/os-release
  • uname -m
  • the complete executable path and command-line options

Do not describe the 2018 issue as a resolved diagnosis: its missing stderr leaves the cause undetermined.

2. Verify which Chromium executable is being launched

Regular puppeteer normally uses the browser downloaded for that package. puppeteer-core requires you to provide a browser, and an explicit executablePath overrides the downloaded one. A system package, an old cached download and a custom binary can therefore have different dependencies.

Check a downloaded browser

Inspect the path printed by your Puppeteer installation, or resolve it in your application before launch. Confirm that it exists and is executable:

ls -l /absolute/path/to/chrome
file /absolute/path/to/chrome
/absolute/path/to/chrome --version

Check a configured path

If your code contains executablePath, verify that exact value. A nonexistent path, a directory, a Windows path copied into Linux, or a file without execute permission produces a launch failure unrelated to missing libraries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
test -x /absolute/path/to/chrome && echo executable || echo missing-or-not-executable

Use the same binary for every subsequent diagnostic command. Running ldd against a different Chromium than the one Puppeteer starts can send you down the wrong branch.

3. Diagnose missing shared libraries with ldd

For a loader error, inspect unresolved libraries directly. Puppeteer’s Linux troubleshooting guidance uses this pattern:

ldd /absolute/path/to/chrome | grep not

On some systems, use the more explicit form:

ldd /absolute/path/to/chrome | grep 'not found'

Every unresolved .so name must be mapped to the Ubuntu package that supplies it. Common Debian/Ubuntu runtime packages in Puppeteer’s guidance include:

  • libpango-1.0-0
  • libpangocairo-1.0-0
  • libnss3
  • GTK libraries
  • X11 libraries

The historical EC2 error libpangocairo-1.0.so.0 corresponds to the Pango Cairo runtime represented by libpangocairo-1.0-0. Treat that as an example to verify, not as a universal install command: the required set depends on the browser binary and the host image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install only packages justified by the inspection

After identifying the package for each missing library, update the package index and install the matching runtime packages. For example, if your inspection confirms the Pango Cairo dependency is absent:

sudo apt-get update
sudo apt-get install -y libpangocairo-1.0-0

Repeat the check after installation. If another library is reported, resolve that library rather than adding unrelated packages. Ubuntu 16.04 is an old release; repository availability and package versions can differ from newer Ubuntu images, so confirm that the package is available for the image you are actually running.

Why installing a random dependency bundle is risky

A large copy-and-paste list may hide which dependency fixed the problem, install obsolete packages, or still miss a library required by a different Chromium build. The reliable loop is: inspect the exact binary, map each unresolved name, install the corresponding package, and run ldd again.

4. Separate loader failures from sandbox failures

Sandbox errors are a different branch. Chromium uses sandbox layers to isolate untrusted web content. If stderr says No usable sandbox!, investigate the host’s sandbox configuration, kernel support and execution context while keeping sandboxing enabled wherever possible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Running without a sandbox is strongly discouraged. Consider configuring a sandbox instead.” — Puppeteer troubleshooting documentation

Do not add --no-sandbox merely because launch failed. The historical issue that used that flag still failed on a missing library, demonstrating that disabling the sandbox cannot repair a dynamic-loader error. If you must use the flag for absolutely trusted content in a controlled environment, treat it as a security exception, document it, and understand that it removes an important protection.

Look for the exact sandbox wording

  • No usable sandbox!: review sandbox setup and the security context; do not mask the error with a default --no-sandbox recommendation.
  • lib*.so... cannot open shared object file: return to ldd and package mapping.
  • Permission or operation-not-permitted errors: compare the test user, filesystem permissions and any container or service restrictions with the interactive shell.

5. Check headless mode and display requirements only when indicated

Headful Chromium requires a display server. If the error mentions DISPLAY, X11, or an inability to open a display, either run headless or provision a virtual display such as Xvfb for the headed workflow. Do not install display tooling to solve a missing libpangocairo or other loader error.

Headless test

Use a minimal headless launch first. This removes the display-server variable while you diagnose dependencies and sandboxing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const browser = await puppeteer.launch({ headless: true, dumpio: true });

Headed operation

If your application genuinely needs a visible browser, provide a working X server or Xvfb and set the appropriate DISPLAY value for the service user. The maintainer guidance mentions Xvfb for non-headless CI scenarios; it is not a substitute for installing missing shared libraries.

6. Retest with the production execution context

Once the matching branch is corrected, rerun the minimal script with the same user, environment, executable path and arguments as production. Preserve the complete stderr from both the failing and successful runs. If a service manager launches Node, compare its PATH, home directory, permissions, proxy settings and temporary-directory access with your interactive shell.

Only claim a version combination as working when you have actually tested it. The historical reports used Puppeteer 1.2 with Node 8.11.2 and Puppeteer 0.10.1, respectively. Current Puppeteer and Chromium releases are not guaranteed by these reports to support Ubuntu 16.04, so upgrading the operating system may be necessary for a supported modern stack. The maintainer EC2 example targets Amazon Linux and uses its package manager; do not copy those yum steps into an Ubuntu guide.

Diagnostic decision table

What stderr shows Likely branch Next action
lib*.so... cannot open shared object file Unresolved runtime dependency Run ldd on the exact binary and install the package providing each missing library.
No usable sandbox! Sandbox configuration or security context Configure a usable sandbox; avoid making --no-sandbox the default.
Path does not exist or is not executable Wrong or inaccessible browser binary Verify executablePath, permissions and the browser installation.
DISPLAY, X11 or display-open errors Headful browser without a display Use headless mode or provision Xvfb/a display server.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and recovery

Copying Amazon Linux commands to Ubuntu

Package names and package managers differ. Use Ubuntu’s apt-get and packages mapped to your unresolved libraries; the EC2 example in current Puppeteer guidance is for Amazon Linux.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value

Changing ignoreHTTPSErrors to fix launch

ignoreHTTPSErrors affects certificate handling after the browser starts. It does not install libraries, create a sandbox or provide a display.

Testing as the wrong user

A launch that works over SSH can fail under a service account because permissions, environment variables or sandbox access differ. Reproduce the failure under the account that runs the application.

Assuming Ubuntu 16.04 compatibility

The old issue versions are historical, and the reviewed guidance does not promise support for Ubuntu 16.04 by current Puppeteer or Chrome. Pin versions only after testing, and plan an OS upgrade when the browser you need no longer runs on the image.

Or skip the browser setup

If your goal is simply to obtain a clean website image or PDF rather than maintain Chromium on EC2, ScreenshotNeo provides a website screenshot API and MCP server. One request returns PNG, JPEG, WebP or PDF. Before capture it accepts consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the API documentation at https://screenshotneo.com/docs/ for all options.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also offers an MCP server for Claude, Cursor and other MCP clients, so AI agents can call take_screenshot, get_page_info and capture_pdf. Its free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots, and every feature is on every plan. Create a free ScreenshotNeo account to try it.

Frequently Asked Questions

Does ignoreHTTPSErrors fix Chromium launch errors?

No. It controls certificate handling after launch and does not resolve missing libraries, sandbox configuration or display-server problems.

Should I always add --no-sandbox on EC2?

No. Puppeteer strongly discourages running without a sandbox. Use the flag only for absolutely trusted content when you have deliberately accepted the security trade-off.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is Ubuntu 16.04 supported by current Puppeteer?

The historical reports and troubleshooting guidance do not guarantee current Puppeteer/Chromium support for Ubuntu 16.04. Verify the versions you intend to deploy or upgrade the operating system.

Quick Recap

Bestseller No. 1
The Chromium Connection: A Lesson in Nutrition
The Chromium Connection: A Lesson in Nutrition
Used Book in Good Condition
$213.49
Bestseller No. 3
Bestseller No. 4
Bestseller No. 5
The Chromium Diet, Supplement and Exercise Strategy
The Chromium Diet, Supplement and Exercise Strategy
Used Book in Good Condition
$17.95

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.