fix: start Xvfb before Node so Chrome has a display
Without Xvfb running, Chrome exits immediately with code 1. The base sitespeedio image normally handles this via its own entrypoint script; we now replicate that with start.sh. Also drop --headless (breaks visual metrics) and add --disable-gpu for stable Chrome rendering inside Docker. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,17 +22,18 @@ export function runTest(job, onLine) {
|
||||
'--sustainable.enable',
|
||||
'--axe.enable',
|
||||
'--coach',
|
||||
'--headless',
|
||||
];
|
||||
|
||||
if (job.mobile) {
|
||||
args.push('--mobile');
|
||||
}
|
||||
|
||||
// In Docker we need --xvfb false and --browsertime.chrome.args=no-sandbox
|
||||
// Chrome needs these flags when running inside Docker
|
||||
if (process.env.IN_DOCKER) {
|
||||
args.push('--browsertime.chrome.args', 'no-sandbox');
|
||||
args.push('--browsertime.chrome.args', 'disable-dev-shm-usage');
|
||||
// Disable GPU compositing — not needed in Xvfb and can cause crashes
|
||||
args.push('--browsertime.chrome.args', 'disable-gpu');
|
||||
}
|
||||
|
||||
onLine(`[runner] Starting: node ${args.slice(0, 3).join(' ')} ...`);
|
||||
|
||||
Reference in New Issue
Block a user