convert-svg icon indicating copy to clipboard operation
convert-svg copied to clipboard

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

Open paintoshi opened this issue 2 years ago • 3 comments

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.

paintoshi avatar Jun 27 '22 06:06 paintoshi

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

ibenjelloun avatar Aug 16 '22 08:08 ibenjelloun

same error here

tina1998612 avatar Nov 29 '22 09:11 tina1998612

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 🤷‍♂️

BooDoo avatar Dec 30 '22 03:12 BooDoo