musistudio/claude-code-router · error · Error
${label} failed because the browser tab is destroyed.
Error message
${label} failed because the browser tab is destroyed. What it means
Error "${label} failed because the browser tab is destroyed." thrown in musistudio/claude-code-router.
Source
Thrown at packages/electron/src/main/browser-automation-mcp.ts:2329
} finally {
if (attachedHere && webContents.debugger.isAttached()) {
try {
webContents.debugger.detach();
} catch {
// Ignore detach errors after the dialog is resolved.
}
}
}
}
async function executeJavaScriptWithTimeout<T = unknown>(
webContents: WebContents,
script: string,
timeoutMs: number,
label: string
): Promise<T> {
if (webContents.isDestroyed()) {
throw new Error(`${label} failed because the browser tab is destroyed.`);
}
return await withTimeout(
webContents.executeJavaScript(script, true) as Promise<T>,
timeoutMs,
`${label} timed out after ${timeoutMs}ms.`
);
}
async function withTimeout<T>(promise: Promise<T>, timeoutMs: number, message: string): Promise<T> {
let timer: ReturnType<typeof setTimeout> | undefined;
try {
return await Promise.race([
promise,
new Promise<T>((_resolve, reject) => {
timer = setTimeout(() => reject(new Error(message)), Math.max(0, timeoutMs));
})
]);
} finally {View on GitHub (pinned to 99f24806c6)
When it happens
Trigger: Thrown at packages/electron/src/main/browser-automation-mcp.ts:2329 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27).
Data as JSON: /api/errors/e52958e5404da8f8.
Report an issue: GitHub.