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 libxrandr2Not 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
Contents
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 libxrandr2On 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