diff --git a/packages/bazel/src/protractor/protractor.conf.js b/packages/bazel/src/protractor/protractor.conf.js index 70ee78a475..dae9bb3c8d 100644 --- a/packages/bazel/src/protractor/protractor.conf.js +++ b/packages/bazel/src/protractor/protractor.conf.js @@ -107,6 +107,11 @@ if (process.env['WEB_TEST_METADATA']) { if (headless) { args.push('--headless'); args.push('--disable-gpu'); + const isRoot = process.getuid && process.getuid() == 0; + if (isRoot) { + // Specify --no-sandbox if it is started by root. + args.push('--no-sandbox'); + } } setConf(conf, 'directConnect', true, 'is set to true for chrome'); setConf(