Skip to content
Nilay Kabariya

Entry No.100·Fixes··2 min read

Fix: Puppeteer "Failed to launch the browser process" (Code: 127)

Chrome downloads, then Puppeteer exits with Code: 127 on slim Debian. The missing libraries, apt packages for Debian 12 and 13, and the launch that worked.

by Nilay#puppeteer#docker#debian#nodeFIXED

The error, verbatim

Jump to the fix ↓
Error: Failed to launch the browser process: Code: 127

stderr:

The fix that worked

Install Chrome's system libraries, then launch again:

apt-get update
apt-get install -y --no-install-recommends libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2
Not it? Every cause, tested ↓

Tested on

Puppeteer
25.17.0 (Chrome 157.0.8103.50)
Node
24.22.3
Images
node:24-bookworm-slim (Debian 12), node:24-trixie-slim (Debian 13)
Where
GitHub Actions containers, November 13, 2026

✓ Last re-run on GitHub Actions · see the run · all repros

Puppeteer found Chrome, started it, and Chrome died at once. Code: 127 is the shell’s “command found, but could not run” status, and stderr: comes back empty, so the message tells you nothing. On a slim Debian image the cause is missing system libraries.

Install the libraries Chrome links against. On Debian 12 (node:24-bookworm-slim):

apt-get update
apt-get install -y --no-install-recommends libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2

On Debian 13 (node:24-trixie-slim) several names carry a t64 suffix: libasound2t64, libatk-bridge2.0-0t64, libatk1.0-0t64, libatspi2.0-0t64, libcups2t64 and libglib2.0-0t64, and it also needs libdbus-1-3 and libexpat1.

See the real error

Puppeteer hides it. Run the downloaded Chrome yourself:

~/.cache/puppeteer/chrome/linux-*/chrome-linux64/chrome --headless --no-sandbox about:blank

On both images the first line was:

error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory

The first name you see depends on the image, so don’t search for one library. ldd over the same binary listed 25 missing libraries on both images, including libnspr4.so, libnss3.so, libX11.so.6, libgbm.so.1 and libasound.so.2. Installing one of them just moves you to the next.

Find every package at once

This is how I got the lists above, and it works on any Debian-based image:

CH=$(find ~/.cache/puppeteer -name chrome -type f | head -1)
ldd "$CH" | grep "not found"
apt-get install -y apt-file && apt-file update
apt-file search --regexp "/usr/lib/x86_64-linux-gnu/libnspr4.so$"

apt-file names the package that owns each missing file, which avoids the t64 guesswork on newer releases. One round was enough on both images: after it, ldd reported nothing missing.

If Chrome is not there at all

On the same slim images, npm install puppeteer ended with empty browser folders in ~/.cache/puppeteer and the message Could not find Chrome. After apt-get install -y unzip ca-certificates and a clean cache, the same install downloaded Chrome. That’s a different error, covered in Puppeteer: Could not find Chrome.

--no-sandbox in containers

My launch used --no-sandbox because the test ran as root inside a container. Running Chrome without its sandbox is a trade-off: it’s what most Docker setups do, but only load pages you trust.

Test setup

Each image started bare, installed Puppeteer 25.17.0 with npm install, and ran three steps: launch, ldd on the Chrome binary, then the install and a second launch. The script and the run logs are public: nk-repro/puppeteer-libs, run 43463966292.

— N.K., end of entry No.100

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.090

    Node 26 error: libatomic.so.1 cannot open shared object file

    node or npm fails with error while loading shared libraries: libatomic.so.1 after moving to Node 26. Tested on 9 Linux images, Docker and nvm, with fixes.

    > node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

    FIXED4 min
  2. No.086

    npm error code EACCES: permission denied, 3 causes tested

    npm error code EACCES with syscall mkdir or open: a global install, a cache that sudo left behind, or Docker. Each reproduced, with the fix that lasts.

    > npm error code EACCES

    FIXED4 min
  3. No.038

    Fix: Puppeteer "Could not find Chrome (ver. …)"

    Puppeteer can't find Chrome though npm install worked. Six causes reproduced on Windows and Linux, including npm 12, upgrades and Docker, each with its fix.

    > Error: Could not find Chrome (ver. 154.0.8037.57). This can occur if either

    FIXED5 minWindows

tip: paste the exact error text