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.

Error: Failed to launch the browser process! spawn chrome.exe ENOENT

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 3.0.0
  • Platform / OS version: Windows 10 x64 1909
  • URLs (if applicable):
  • Node.js version: v14.0.0-v8-canary20200415b958dfb8bf

What steps will reproduce the problem?

Please include code that reproduces the issue.

  1. There is a codebase which works perfectly with Puppeteer 2.1.1
  2. Upgrade Puppeteer to 3.0.0 via package.json: "puppeteer": "^3.0.0". That’s the only change I applied.
  3. Try to generate a PDF.

Puppeteer initialization:

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

What is the expected result? A PDF should be generated.

What happens instead?

(node:12196) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! spawn C:\Users\User\PROJ\node_modules\puppeteer.local-chromium\win64-737027\chrome-win\chrome.exe ENOENT

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

at onClose (C:\Users\User\PROJ\node_modules\puppeteer\lib\Launcher.js:615:20)
at ChildProcess.<anonymous> (C:\Users\User\PROJ\node_modules\puppeteer\lib\Launcher.js:607:71)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

(node:12196) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:12196) [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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:24
  • Comments:29 (4 by maintainers)

github_iconTop GitHub Comments

98reactions
tiagoboeingcommented, Apr 19, 2021

For me on Linux, the only way to resolve is by installing some dependencies:

sudo apt-get update
sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.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
sudo apt-get install -y libgbm-dev

Source

40reactions
pubmikebcommented, May 11, 2020

@dance2die, I’ve just removed puppeteer 3.0.0 from the package.json, refreshed node modules installation, then readded puppeteer 3.0.4 to the package.json and installed. Everything is OK.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Failed to launch the browser process puppeteer
What worked for me was: let browser = await puppeteer.launch({ executablePath: '/usr/bin/chromium-browser', args: [ '--disable-gpu', '--disable ...
Read more >
Internal browser error: Failed to launch the browser process!
Internal browser error: Failed to launch the browser process! If you're getting the above error, run the following command to fix the issue....
Read more >
Troubleshooting
Some chrome policies might enforce running Chrome/Chromium with certain ... Error: Failed to launch chrome! spawn /usr/bin/chromium-browser ENOENT.
Read more >
“Failed to launch the browser process! spawn puppeteer” ...
Puppeteer Error on ubuntu 100% Correct Solution by Vivek wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt install .
Read more >
Error: Failed to launch the browser process puppeteer-node.js
-in node_modules/puppeteer/.local-chrominium/win64-869685/ , replace the chrome-win file by the one you dowloaded. Barnabe Mugnier 11.
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 Tweet

No results found

github_iconTop Related Hashnode Post

No results found