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

unsupported flag --disable-setuid-sandbox #25

Open
1gluk opened this issue Sep 18, 2017 · 9 comments
Open

unsupported flag --disable-setuid-sandbox #25

1gluk opened this issue Sep 18, 2017 · 9 comments

Comments

@1gluk
Copy link

1gluk commented Sep 18, 2017

I suggest removing this code, the flag is no longer used in chrome.

if (process.platform === 'linux') {
           flags.push('--disable-setuid-sandbox');
        }
@paulirish
Copy link
Member

AFAIk this flag IS used: https://cs.chromium.org/search/?q=kDisableSetuidSandbox&sq=package:chromium&type=cs

See the zygote_host_impl_linux.cc results.

@paulequilibrio
Copy link

Hi guys,
I need to launch a headless chrome without this flag to run my tests.
There is any particular reason to this flag be obligatory on Linux?

@zaaack
Copy link

zaaack commented Feb 5, 2018

This flag would cause this error and cannot launch chrome

27907:27907:0205/194525.657250:FATAL:zygote_host_impl_linux.cc(107)] 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.
[1]    27907 abort      /usr/bin/google-chrome-stable --disable-translate --disable-extensions 

@samccone samccone changed the title unsupportet flag --disable-setuid-sandbox unsupported flag --disable-setuid-sandbox Apr 1, 2018
samccone added a commit that referenced this issue Apr 1, 2018
If a user still needs to do this, they can pass this flag as a launch
flag option.

Fixes #25
@calebeby
Copy link
Contributor

calebeby commented Jul 6, 2019

Any reason why @samccone's commit wasn't merged? I'd love to get rid of this annoying warning 🤔

@patrickhulce
Copy link
Collaborator

@calebeby see #68 (comment), if you'd like to be the one to pick it up, be our guest :)

@calebeby
Copy link
Contributor

calebeby commented Jul 6, 2019

@patrickhulce I'm not sure I completely understand the relation between this issue and the linked PR. If I submitted a PR that just removed the --disable-setuid-sandbox flag, but didn't do anything else related to Alpine linux, would that be accepted?

@marklochrie50265
Copy link

any update on this?

@patrickhulce
Copy link
Collaborator

This flag is still in use in the Chromium codebase AFAICT, so we would like to continue supporting it, but we've added ignoreDefaultFlags as a way to disable other default flags in chrome-launcher that doesn't yet affect this one.

If anyone would like to submit a PR that adds a check for ignoreDefaultFlags to

if (getPlatform() === 'linux') {
flags.push('--disable-setuid-sandbox');
}

I think that sounds good! 👍

@JavaScriptDude
Copy link

I have found a workaround for this on Linux.

You can use the ignoreDefaultFlags setting as follows:

const ChromeLauncher = require('chrome-launcher');

var flags = ChromeLauncher.Launcher.defaultFlags();

// optional: filter out flags
// Eg. Enabling extensions and Audio
// flags = flags.filter(flag => flag !== '--disable-extensions' && flag !== '--mute-audio')

// optional: Add you own flags
// flags.push('--proxy-server=192.168.101.200:8213')

ChromeLauncher.launch({
   startingUrl: ''
  ,userDataDir: '/dpool/vcmain/sys/chrome/profiles/CORP_DEV_LOCAL'
  ,ignoreDefaultFlags: true
  ,chromeFlags: flags
}).then(chrome => {
  console.log(`Chrome debugging port running on ${chrome.port}`);
});

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

8 participants