Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: CentOS 8 ---- Error: Failed to launch the browser process! #5361

Closed
ghost opened this issue Jan 29, 2020 · 15 comments
Closed

Fixed: CentOS 8 ---- Error: Failed to launch the browser process! #5361

ghost opened this issue Jan 29, 2020 · 15 comments

Comments

@ghost
Copy link

ghost commented Jan 29, 2020

I was getting this error:

Error: Failed to launch the browser process!
/home/user/scraper/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory


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

    at onClose (/home/user/scraper/node_modules/puppeteer/lib/Launcher.js:750:14)
    at Interface.<anonymous> (/home/user/scraper/node_modules/puppeteer/lib/Launcher.js:739:50)
    at Interface.emit (events.js:228:7)
    at Interface.close (readline.js:402:8)
    at Socket.onend (readline.js:180:10)
    at Socket.emit (events.js:228:7)
    at endReadableNT (_stream_readable.js:1185:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
(node:32709) 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:32709) [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.

Not sure which fixed it but I run those two commands here:

sudo yum install -y gconf-service libasound2 libatk1.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

and then I installed chromium

sudo yum install -y chromium

I hope this helps anyone.

@hengkx
Copy link

hengkx commented Feb 29, 2020

centos 7 same error

@kuru-kh
Copy link

kuru-kh commented Apr 29, 2020

I had the same issue in the centos 7 running only
sudo yum install -y chromium fixed the problem
Thanks @damiantoczek

@JOELJOSEPHCHALAKUDY
Copy link

Thanks @damiantoczek

@goalbased
Copy link

@damiantoczek
I got a lot No match for argument like blow can you help?

No match for argument: gconf-service
No match for argument: libasound2
No match for argument: libatk1.0-0
No match for argument: libc6
No match for argument: libcairo2
No match for argument: libcups2
No match for argument: libdbus-1-3
No match for argument: libexpat1
No match for argument: libfontconfig1
No match for argument: libgcc1
No match for argument: libgconf-2-4
No match for argument: libgdk-pixbuf2.0-0
No match for argument: libglib2.0-0
No match for argument: libgtk-3-0
No match for argument: libnspr4
No match for argument: libpango-1.0-0
No match for argument: libpangoca

@p30arena
Copy link

p30arena commented Oct 11, 2020

in my case, I had to run this: (CentOS 8)
yum install -y chromium libmng libXScrnSaver libXv

@pierreminiggio
Copy link

yum install -y chromium libmng libXScrnSaver libXv

Thanks ! It that fixed it for me as well (CentOS 8)

@arshteamoxio
Copy link

Needed Below things for Centos:-

alsa-lib.x86_64
atk.x86_64
cups-libs.x86_64
gtk3.x86_64
ipa-gothic-fonts
libXcomposite.x86_64
libXcursor.x86_64
libXdamage.x86_64
libXext.x86_64
libXi.x86_64
libXrandr.x86_64
libXScrnSaver.x86_64
libXtst.x86_64
pango.x86_64
xorg-x11-fonts-100dpi
xorg-x11-fonts-75dpi
xorg-x11-fonts-cyrillic
xorg-x11-fonts-misc
xorg-x11-fonts-Type1
xorg-x11-utils
libnss3.so
libatk-bridge-2.0.so.0

After installing dependencies you need to update nss library using this command

yum update nss -y
yum install at-spi2-atk
yum install libdrm.so.2
yum install pulseaudio
yum install libdrm
yum install libgbm

@zhaosheng808
Copy link

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

@AlivingX
Copy link

How did you solve it?

@stale
Copy link

stale bot commented Jun 23, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 23, 2022
@stale
Copy link

stale bot commented Jul 23, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

@stale stale bot closed this as completed Jul 23, 2022
@FosterG4
Copy link

in my case, It fixed it for me

run :
yum install -y chromium libmng libXScrnSaver libXv pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc
yum update nss -y

test it with :

'use strict';
const puppeteer = require('puppeteer');
const fs = require('fs');
(async () => {
  console.info("Starting browser");
  let browser;
  try {
    browser = await puppeteer.launch({});
  } catch (e) {
    console.info("Unable to launch browser mode in sandbox mode. Lauching Chrome without sandbox.");
    browser = await puppeteer.launch({args:['--no-sandbox']});
  }
  console.info("Browser successfully started");
  console.info("Closing browser");
  await browser.close();
  console.info("Done");
})();

@caioagiani
Copy link

sudo yum install -y chromium worked from me, thanks!

@tngflx
Copy link

tngflx commented May 16, 2023

I solve it with centos section.. no need to type all that dependencies
https://geekflare.com/install-chromium-ubuntu-centos/

@noname29
Copy link

Error: Unable to find a match: chromium I am running oracle VM what's wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests