puppeteer: [Bug]: Failed to launch the browser process!
Bug description
Steps to reproduce the problem: I am having difficulty running puppeteer functions . I keep getting this error - (node:13460) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! /node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:237:20) at Interface.helper_js_1.helper.addEventListener (/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:227:68) at Interface.emit (events.js:203:15) at Interface.close (readline.js:397:8) at Socket.onend (readline.js:173:10) at Socket.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) (node:13460) 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(). (rejection id: 1) (node:13460) [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.
I have tried installing all dependencies and all 1000 resolutions to disable sandbox and what not but no luck , i will be really glad if you can help me out with this error resolution.
Puppeteer version
13.5.1
Node.js version
17.0.0
npm version
6.14.4
What operating system are you seeing the problem on?
Linux, Windows
Relevant log output
node:13460) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/node_modules/puppeteer/.local-chromium/linux-970485/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:237:20)
at Interface.helper_js_1.helper.addEventListener (/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:227:68)
at Interface.emit (events.js:203:15)
at Interface.close (readline.js:397:8)
at Socket.onend (readline.js:173:10)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:13460) 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(). (rejection id: 1)
(node:13460) [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.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 15
it seems i’v been missing some packages, installing these fixed the issue :
We encounter this issue aswell, while using mermaid-cli version ^8.13.5
Stacktrace:
In a similar way installing
chromiuminstalls the required dependencies (and a little more)Also please use our new Docker image that comes with the dependencies pre-installed https://github.com/puppeteer/puppeteer/pkgs/container/puppeteer
This issue indicates that your OS is missing the required dependencies for the Chromium binary. Please follow the troubleshooting.md guide linked in the error message to see which dependencies are missing.
/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:237 reject(new Error([