Closed paulequilibrio closed 6 years ago
Try removing the runner: 'google-chrome-stable'
bit.
Also please
chrome-launcher
),Looking into chrome-launcher
's source code I was able to figure out the failure reason.
The chrome-launcher
module adds a --disable-setuid-sandbox
flag when running on linux platform.
There is some way to wallaby override this behaviour?
Looks like Chrome launcher is adding the --disable-setuid-sandbox
flag in addition to the flags passed from outside, so there must be a reason why Chrome team is doing it and are making this flag not optional. I'd recommend raising an issue/question in the launcher repo about it.
Having said that, there is way in wallaby to override this behaviour if you like. In your wallaby config, you may intercept process spawn
calls made by chrome launcher and just remove the flag:
const cp = require('child_process');
const spawn = cp.spawn;
cp.spawn = function () {
const flags = arguments[1];
if (flags.length) {
arguments[1] = flags.filter(f => f !== '--disable-setuid-sandbox');
}
return spawn.apply(this, arguments);
};
// the rest of your wallaby config
module.exports = function (wallaby) {
...
};
Thanks for your quick responses! Your workaround works fine for me here.
Awesome, thanks for the update!
Hi, I'm trying to use headless chrome in my tests but the wallaby console just show:
Test run failure: Sandbox load failed, status: failed: Chrome is not running
The relevant part of my wallaby.js is:
My Chrome is
version 61.0.3163.79 (Official Build) (64-bit)
on Linux. Doesn't matter if chrome is running or not, I always receive that message.