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

Most upvoted comments

Now I’ve solved it!install libXScrnSaver in the server and can run it!

sudo yum -y install libXScrnSaver-1.2.2-6.1.el7.x86_64

In Ubuntu you have to:

    apt install chromium-browser
    apt install libxkbcommon0 
    apt install libxshmfence1
    apt install 1622  apt-get install ca-certificates 
    apt install fonts-liberation 
    apt install libasound2 
    apt install libatk-bridge2.0-0 
    apt install libatk1.0-0 
    apt install libc6 
    apt install libcairo2 
    apt install libcups2 
    apt install libdbus-1-3 
    apt install libexpat1 
    apt install libfontconfig1 
    apt install libgbm1 
    apt install libgcc1 
    apt install libglib2.0-0 
    apt install libgtk-3-0 
    apt install libnspr4 
    apt install libnss3 
    apt install libpango-1.0-0 
    apt install libpangocairo-1.0-0 
    apt install libstdc++6 
    apt install libx11-6 
    apt install libx11-xcb1 
    apt install libxcb1 
    apt install libxcomposite1 
    apt install libxcursor1 
    apt install libxdamage1 
    apt install libxext6 
    apt install libxfixes3 
    apt install libxi6 
    apt install libxrandr2 
    apt install libxrender1 
    apt install libxss1 
    apt install libxtst6 
    apt install lsb-release wget 
    apt install xdg-utils
    apt install 

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 togather

Just 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

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 togather

worked for me Thank You

@zhaosheng808 What does the command do?

I am getting bash: yum: command not found as error.

I don’t know the specific principle of this, but I have performed the following operations and the problem has been solved

sudo yum -y install libXScrnSaver-1.2.2-6.1.el7.x86_64

and

sudo yum install -y chromium

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.