build: disable sandbox when running protractor through bazel (#28557)
Adds `--no-sandbox` in order to disable the sandbox when running Protractor through Bazel. Enabling the sandbox causes Chrome to crash under certain environments. PR Close #28557
This commit is contained in:
parent
851cf16134
commit
8d90142a0f
|
@ -129,10 +129,12 @@ if (process.env['WEB_TEST_METADATA']) {
|
||||||
if (webTestNamedFiles['CHROMIUM']) {
|
if (webTestNamedFiles['CHROMIUM']) {
|
||||||
const chromeBin = require.resolve(webTestNamedFiles['CHROMIUM']);
|
const chromeBin = require.resolve(webTestNamedFiles['CHROMIUM']);
|
||||||
const chromeDriver = require.resolve(webTestNamedFiles['CHROMEDRIVER']);
|
const chromeDriver = require.resolve(webTestNamedFiles['CHROMEDRIVER']);
|
||||||
const args = [];
|
|
||||||
|
// The sandbox needs to be disabled, because it causes Chrome to crash on some environments.
|
||||||
|
// See: http://chromedriver.chromium.org/help/chrome-doesn-t-start
|
||||||
|
const args = ['--no-sandbox'];
|
||||||
if (headless) {
|
if (headless) {
|
||||||
args.push('--headless');
|
args.push('--headless', '--disable-gpu');
|
||||||
args.push('--disable-gpu');
|
|
||||||
}
|
}
|
||||||
setConf(conf, 'directConnect', true, 'is set to true for chrome');
|
setConf(conf, 'directConnect', true, 'is set to true for chrome');
|
||||||
setConf(conf, 'chromeDriver', chromeDriver, 'is determined by the browsers attribute');
|
setConf(conf, 'chromeDriver', chromeDriver, 'is determined by the browsers attribute');
|
||||||
|
|
Loading…
Reference in New Issue