From 954d202c041ff85401861902988275e949fa3b20 Mon Sep 17 00:00:00 2001 From: Hibryda Date: Sun, 22 Mar 2026 06:50:45 +0100 Subject: [PATCH] fix(e2e): kill stale CDP port before Electrobun launch --- tests/e2e/wdio.electrobun.conf.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/e2e/wdio.electrobun.conf.js b/tests/e2e/wdio.electrobun.conf.js index 73e5b29..bccc054 100644 --- a/tests/e2e/wdio.electrobun.conf.js +++ b/tests/e2e/wdio.electrobun.conf.js @@ -77,6 +77,9 @@ export const config = { } if (!electrobunBinary) { + // Kill any stale process on CDP port before launching + try { execSync(`fuser -k ${CDP_PORT}/tcp 2>/dev/null || true`); } catch {} + // Fall back to `electrobun dev` which builds + launches in one step console.log('[electrobun-cdp] No binary found, launching via electrobun dev...'); appProcess = spawn('npx', ['electrobun', 'dev'], {