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

Add posibility to run puppeteer with --no-sandbox #6

Closed
Hector68 opened this issue Apr 7, 2020 · 4 comments
Closed

Add posibility to run puppeteer with --no-sandbox #6

Hector68 opened this issue Apr 7, 2020 · 4 comments

Comments

@Hector68
Copy link
Contributor

Hector68 commented Apr 7, 2020

I got error

Failed to launch the browser process! 09:35:52
[0407/093552.508440:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

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

[0407/093552.508440:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https:crbug.com/638180.

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

at onClose (/node_modules/puppeteer/lib/Launcher.js:750:14)
at Interface. (/node_modules/puppeteer/lib/Launcher.js:739:50)
at Interface.emit (events.js:323:22)
at Interface.close (readline.js:409:8)
at Socket.onend (readline.js:187:10)
at Socket.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

@krzksz
Copy link
Collaborator

krzksz commented Apr 7, 2020

Hey @Hector68, thanks for raising the issue.
I will check if there are any downsides in always adding --no-sandbox so we don't need another option to be added. On the other hand, are you sure you need to run magepack as root user?

@Hector68
Copy link
Contributor Author

Hector68 commented Apr 7, 2020

I use a docker . But if I run it by another user I will get error

 ERROR  Failed to launch the browser process!                                                                 12:24:07
[0407/122406.949479:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x556d8f89e219 base::debug::CollectStackTrace()
#1 0x556d8f802363 base::debug::StackTrace::StackTrace()
#2 0x556d8f814195 logging::LogMessage::~LogMessage()
#3 0x556d9109000e service_manager::ZygoteHostImpl::Init()
#4 0x556d8f40bf27 content::ContentMainRunnerImpl::Initialize()
#5 0x556d8f45aafa service_manager::Main()
#6 0x556d8f40a501 content::ContentMain()
#7 0x556d8f4598f5 headless::(anonymous namespace)::RunContentMain()
#8 0x556d8f45959d headless::HeadlessShellMain()
#9 0x556d8cfceaa7 ChromeMain
#10 0x7f5f6ffe72e1 __libc_start_main
#11 0x556d8cfce8ea _start

@vbuck
Copy link

vbuck commented Apr 9, 2020

Can confirm that this solves the same issue:

Since this is a tool intended for use with build pipelines, I see no harm in disabling sandbox functionality. If you serve an application from source code that is infected with XSS or CSRF content which could exploit the the host, then you have a larger problem than to worry about!

Hector68 added a commit to Hector68/magepack that referenced this issue Apr 9, 2020
@krzksz krzksz closed this as completed in 7f203a8 Apr 9, 2020
@krzksz
Copy link
Collaborator

krzksz commented Apr 9, 2020

Released in 2.2.1

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

No branches or pull requests

3 participants