Makepad-fr / fbjs

Tooling that automates your Facebook interactions.
https://www.npmjs.com/package/@makepad/fbjs
GNU General Public License v3.0
64 stars 23 forks source link

CentOS without GUI: cannot open shared object file #19

Closed gakowalski closed 3 years ago

gakowalski commented 3 years ago

On CentOS 8 without GUI:

(node:1136594) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! /home/grzegorz.kowalski/facebook-group-posts-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

To fix it (and a host of simiilar errors) I did:

sudo dnf install libX11-xcb libXcomposite libXcursor libXdamage libXi libXtst libXss cups libXScrnSaver alsa-lib atk at-spi2-atk pango gtk3

kaanyagci commented 3 years ago

Hey @gakowalski !

Thank you for pointing this out! The error that you're facing seems like something related to x11 and your fix will install missing dependencies. This could be good to add it in README for new comers or maybe dockerizing the bot with an alpine NodeJS image (that we're planning) can fix the issue

gakowalski commented 3 years ago

I've made some basic docker container to test FGPS on larger facebook groups using 32 GB RAM server. Just running some tests with it: https://github.com/gakowalski/fbjs-container

(After ~45 minutes of constant constant scraping 2.5 GB of RAM is being used. Still working.)

kaanyagci commented 3 years ago

Good work ! How about using a NodeJS alpine image CentOS 8 to reduce to built image size ?

kaanyagci commented 3 years ago

How about creating the Dockerfile in this repo to have it all centralized?

kaanyagci commented 3 years ago

@all-contributors please add @gakowalski for code, documentation and bug reports

allcontributors[bot] commented 3 years ago

@kaanyagci

I've put up a pull request to add @gakowalski! :tada:

gakowalski commented 3 years ago

@kaanyagci

How about using a NodeJS alpine image CentOS 8 to reduce to built image size ?

I would like to do that in the next step. I did it on CentOS, because I work in this system on a daily basis.

How about creating the Dockerfile in this repo to have it all centralized?

It's a great idea. I'm just wondering how it should work so it would be easy for everyone. Should it work like now, so launching a container is opening a new terminal session (I think it's not so easy) or should it launch fgps command right away. In the latter case, you would have to determine where to get the data from and where/how to save results.

Also, I I was wondering if it would be worth doing it in the form of a snap.

gakowalski commented 3 years ago

@kaanyagci OK, I've succesfully excuted fgps --help command on Alpine, but didn't have time to test if it works in any other way. See the https://github.com/gakowalski/fbjs-container/blob/main/Dockerfile

kaanyagci commented 3 years ago

This looks fantastic!

kaanyagci commented 3 years ago

Do you mind migrating in the repo itself?

kaanyagci commented 3 years ago

Also, I was wondering if it would be worth doing it in the form of a snap.

This would be great !