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

How to disable the sandbox with --no-sandbox? #89

Open
paintoshi opened this issue Jun 27, 2022 · 3 comments
Open

How to disable the sandbox with --no-sandbox? #89

paintoshi opened this issue Jun 27, 2022 · 3 comments

Comments

@paintoshi
Copy link

paintoshi commented Jun 27, 2022

I'm running in docker in AWS elastic beanstalk and can't use the --cap-add=SYS_ADMIN (or --priveleged) docker launch option that is required for the sandbox to work. So I need to disable the sandbox.

I'm trying to pass in the puppeteer launch option but it does not seem to use it. Tested with both the convert method directly and via createConverter.

const converter = await createConverter({
  args: ['--no-sandbox', '--disable-setuid-sandbox']
})

This is what I get:
[0627/060536.676927:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/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.

Or if I try to run as root user:
[0627/061005.669057:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

Am I using it wrong? I can't find any information of how to use --no-sandbox with this library.

@ibenjelloun
Copy link

This was working in version 0.5.0 but no more in latest versions.

@tina1998612
Copy link

same error here

@BooDoo
Copy link

BooDoo commented Dec 30, 2022

The {options} you pass in to convert() and createConverter() are being lodash.pick'd for a puppeteer element to determine what's passed on directly to launch(). So your example should work if you change it to:

const converter = await createConverter({
  puppeteer: {
    args: ['--no-sandbox', '--disable-setuid-sandbox']
  }
})

source: it worked for me 🤷‍♂️

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

4 participants