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

Does CentOS system can run puppeteer with sandbox anyway? #560

Closed
zhuyingda opened this Issue Aug 27, 2017 · 12 comments

Comments

Projects
None yet
5 participants
@zhuyingda

zhuyingda commented Aug 27, 2017

After installed all the requirement, I finally run the puppeteer with --no-sandbox and --disable-setuid-sandbox on CentOS 7.3, but it is not secure. I still want to know, is there anyway to run puppeteer with sandbox on CentOS?

@aslushnikov

This comment has been minimized.

Show comment
Hide comment
@aslushnikov

aslushnikov Aug 27, 2017

Contributor

@zhuyingda could you please share what did you do to run on CentOS? It would be very valuable for the #391

I still want to know, is there anyway to run puppeteer with sandbox on CentOS?

The following might help: https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox.md

Contributor

aslushnikov commented Aug 27, 2017

@zhuyingda could you please share what did you do to run on CentOS? It would be very valuable for the #391

I still want to know, is there anyway to run puppeteer with sandbox on CentOS?

The following might help: https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox.md

@zhuyingda

This comment has been minimized.

Show comment
Hide comment
@zhuyingda

zhuyingda Aug 28, 2017

@aslushnikov Of course, the chrome in the.local-chromium dir can not run because of some c++ requirements, I install them by yum(package manager in centos) one by one, here is my install package list:
yum install 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 -y
then, the puppeteer/.local-chrome/linux-496140/chrome-linux/chrome -v --no-sandbox --disable-setuid-sandbox can be ran. However, I still can not run puppeteer, it send out a socket hangup error.
After I installed these fonts, everything is right:
yum install 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 -y

My centos version is: LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.3.1611 (Core) Release: 7.3.1611 Codename: Core

I hope these would be helpful to you, and thanks about the official headless chrome driver you provide, it is awesome!

zhuyingda commented Aug 28, 2017

@aslushnikov Of course, the chrome in the.local-chromium dir can not run because of some c++ requirements, I install them by yum(package manager in centos) one by one, here is my install package list:
yum install 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 -y
then, the puppeteer/.local-chrome/linux-496140/chrome-linux/chrome -v --no-sandbox --disable-setuid-sandbox can be ran. However, I still can not run puppeteer, it send out a socket hangup error.
After I installed these fonts, everything is right:
yum install 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 -y

My centos version is: LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.3.1611 (Core) Release: 7.3.1611 Codename: Core

I hope these would be helpful to you, and thanks about the official headless chrome driver you provide, it is awesome!

@aslushnikov

This comment has been minimized.

Show comment
Hide comment
@aslushnikov

aslushnikov Aug 28, 2017

Contributor

@zhuyingda great, thanks for sharing this! I've added the dependencies to the troubleshooting.md.

Contributor

aslushnikov commented Aug 28, 2017

@zhuyingda great, thanks for sharing this! I've added the dependencies to the troubleshooting.md.

@GavinFangCN

This comment has been minimized.

Show comment
Hide comment
@GavinFangCN

GavinFangCN Sep 3, 2017

@zhuyingda I have this issue too, after I installed all of packages you mentioned I still got the error.

(node:9431) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!

LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.3.1611 (Core)
Release: 7.3.1611
Codename: Core

GavinFangCN commented Sep 3, 2017

@zhuyingda I have this issue too, after I installed all of packages you mentioned I still got the error.

(node:9431) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!

LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.3.1611 (Core)
Release: 7.3.1611
Codename: Core

@zhuyingda

This comment has been minimized.

Show comment
Hide comment
@zhuyingda

zhuyingda Sep 3, 2017

@Dev-GavinFang Try to execute the puppeteer/.local-chrome/linux-496140/chrome-linux/chrome -v --no-sandbox --disable-setuid-sandbox and show me the error info?

zhuyingda commented Sep 3, 2017

@Dev-GavinFang Try to execute the puppeteer/.local-chrome/linux-496140/chrome-linux/chrome -v --no-sandbox --disable-setuid-sandbox and show me the error info?

@tomasAlabes

This comment has been minimized.

Show comment
Hide comment
@tomasAlabes

tomasAlabes Sep 11, 2017

Contributor

If it helps anybody, in my distribution:

LSB Version:	:core-4.1-amd64:core-4.1-ia32:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-ia32:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-ia32:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-ia32:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-ia32:printing-4.1-noarch
Description:	Oracle Linux Server release 7.1

Chrome Headless wasn't capturing because http_proxy was set. Removing all the proxies env variables made it work.

Contributor

tomasAlabes commented Sep 11, 2017

If it helps anybody, in my distribution:

LSB Version:	:core-4.1-amd64:core-4.1-ia32:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-ia32:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-ia32:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-ia32:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-ia32:printing-4.1-noarch
Description:	Oracle Linux Server release 7.1

Chrome Headless wasn't capturing because http_proxy was set. Removing all the proxies env variables made it work.

@Samlin901211

This comment has been minimized.

Show comment
Hide comment
@Samlin901211

Samlin901211 Nov 29, 2017

@zhuyingda I have an error like this
image

Samlin901211 commented Nov 29, 2017

@zhuyingda I have an error like this
image

@zhuyingda

This comment has been minimized.

Show comment
Hide comment
@zhuyingda

zhuyingda Nov 29, 2017

@Samlin901211 It seems like something wrong with dependencies for your running environment. Tell us your system info? I just install puppeteer on centos 7+ system.

zhuyingda commented Nov 29, 2017

@Samlin901211 It seems like something wrong with dependencies for your running environment. Tell us your system info? I just install puppeteer on centos 7+ system.

@Samlin901211

This comment has been minimized.

Show comment
Hide comment
@Samlin901211

Samlin901211 Nov 29, 2017

@zhuyingda
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.0 (Final)
Release: 7.0
Codename: Final

I've installed all pacakges you said below ,but the error always exists

Samlin901211 commented Nov 29, 2017

@zhuyingda
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.0 (Final)
Release: 7.0
Codename: Final

I've installed all pacakges you said below ,but the error always exists

@zhuyingda

This comment has been minimized.

Show comment
Hide comment
@zhuyingda

zhuyingda Nov 29, 2017

@Samlin901211 Have you ever tried my dependencies list? I think your problem may because of gtk3.x86_64 , which is in my package list.

zhuyingda commented Nov 29, 2017

@Samlin901211 Have you ever tried my dependencies list? I think your problem may because of gtk3.x86_64 , which is in my package list.

@Samlin901211

This comment has been minimized.

Show comment
Hide comment
@Samlin901211

Samlin901211 Nov 29, 2017

@zhuyingda I've installed all of your dependencies list include of gtk3.x86_64;

Samlin901211 commented Nov 29, 2017

@zhuyingda I've installed all of your dependencies list include of gtk3.x86_64;

@zhuyingda

This comment has been minimized.

Show comment
Hide comment
@zhuyingda

zhuyingda Nov 29, 2017

@Samlin901211 I dont have any centos 7.0 environment to see what problem you have. If you can, try update your system to centos 7.3 or 7.4, this two version which I am using for puppeteer.

zhuyingda commented Nov 29, 2017

@Samlin901211 I dont have any centos 7.0 environment to see what problem you have. If you can, try update your system to centos 7.3 or 7.4, this two version which I am using for puppeteer.

@haoliqiang haoliqiang referenced this issue Mar 7, 2018

Open

CentOS #7

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