puppeteer: [Bug]: Failed to launch the browser process!
Bug description
An error is thrown when I use the following code!
const browser = await puppeteer.launch({
headless: true
});
error message:
Failed to launch the browser process!\n/opt/video-url-analysis/node_modules/_puppeteer@13.1.0@puppeteer/.local-chromium/linux-950341/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n
I saw the tips about node 14.0.0 Chrome is downloaded but fails to launch on Node.js 14 , but I use the node version is v14.18.1!
What do I need to do to run it!
Puppeteer version
13.1.0
Node.js version
v14.18.1
npm version
6.14.15
What operating system are you seeing the problem on?
Linux
Relevant log output
Failed to launch the browser process!\n/opt/video-url-analysis/node_modules/_puppeteer@13.1.0@puppeteer/.local-chromium/linux-950341/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 15
Now I’ve solved it!install libXScrnSaver in the server and can run it!
In Ubuntu you have to:
In Ubuntu you can try;
sudo apt install libxkbcommon0 libxshmfence1 ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 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 lsb-release wget xdg-utils
to install all the packages togatherJust in case anyone comes here with same problem for Heroku, I created an issue in the libpack library for Heroku. Hopefully it will be discuss there: https://github.com/jontewks/puppeteer-heroku-buildpack/issues/94
worked for me Thank You
I don’t know the specific principle of this, but I have performed the following operations and the problem has been solved
and
you can see this issues https://github.com/puppeteer/puppeteer/issues/5361
@zhaosheng808 What does the command do?
I am getting
bash: yum: command not found
as error.