Error: Failed to launch the browser process! spawn chrome.exe ENOENT
See original GitHub issueSteps 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.
- There is a codebase which works perfectly with Puppeteer 2.1.1
- Upgrade Puppeteer to 3.0.0 via package.json:
"puppeteer": "^3.0.0"
. That’s the only change I applied. - 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:
- Created 3 years ago
- Reactions:24
- Comments:29 (4 by maintainers)
For me on Linux, the only way to resolve is by installing some dependencies:
Source
@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.