Ask coding questions

← Back to all posts
Node.JS Puppeteer: Failed to launch the browser.
h
badst (667)

I'm trying to do some webscraping with Node.Js, but when I use puppeteer, it gives me a error:

(node:88) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/home/runner/SilentScraper/node_modules/puppeteer/.local-chromium/linux-809590/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory

It seems to me like chromium doesn't exist: so I tried downloading it using sudo, which repl doesn't support i guess.
Is there a way I can fix this?

Answered by Coder100 (15516) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (15516)

You have to use bash

View my tutorial here

badst (667)

@Coder100 alright thx for actually helping.

idrgplayer (117)

@pepelaugh that was harsh :/ I tried lol!

Coder100 (15516)

np I had a headache doing this too lol @pepelaugh

Coder100 (15516)

just remember to add your awaits or else you will get some seriously unexpected behavior @pepelaugh

badst (667)

@Coder100 Also what's with xpath being deprecated? page.$x seems to not work anymore.

YodaCode (81)

@Coder100 But then I can't do a node.js webserver, for some reason.

Coder100 (15516)

yes you can, maybe you have to go to localhost:8080 @YodaCode

MarioX (3)

chromin is a part of NPM install plugins see my project with chromium full media enabled
https://repl.it/talk/share/fixing-puppeteer-core-and-chrome-with-plugins/84218

[deleted]

first why do you use chromium

badst (667)

@BRUHIP I'm on windows. chromium is the web browser.

[deleted]

@pepelaugh ik but are you on a school computer or what because you are using something thats not secure at all

badst (667)

@BRUHIP No, i'm on my own PC. And what do you mean chromium isn't secure? If you don't know what you are talking about don't speak.

[deleted]

@pepelaugh "Chromium is an open-sourced web browser project made by Google. ... While Chromium is a legitimate browser, its open-source code has made it unstable, full of bugs and a target for spreading viruses." Article by Panda Security

badst (667)

@BRUHIP Lmao stop making me cringe dude. I'm using a stable version of chrome, and you're just copy pasting my guy.

badst (667)

@BRUHIP Besides: i'm not directly using it, im on chrome browser which is made with chromium.

19wintersp (1115)

@BRUHIP Open-source code doesn't mean it's buggy or unstable: in fact, it could be argued that because so many "good guys" can see if there are any bugs in the code and the whole world can review commits, it is more secure than other software.

[deleted]

@19wintersp true it is better than tor

badst (667)

@19wintersp Yes: that's the point of open source. Mostly it's all about the devs proving it's reliable and other people can improve it.

[deleted]

@pepelaugh ok you won the argument

badst (667)

@BRUHIP No, the point wasn't to argue but for everyone to learn something ^