From 5481c5ed40e4900799b0196fa4b4c6ec90873be6 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Sun, 12 Oct 2025 17:48:49 +0200 Subject: [PATCH] test: test without closed error handling --- src/browser.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/browser.ts b/src/browser.ts index 76fd14f4..003df168 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -120,6 +120,7 @@ export async function launch(options: McpLaunchOptions): Promise { userDataDir, pipe: true, headless, + dumpio: true, args, acceptInsecureCerts: options.acceptInsecureCerts, handleDevToolsAsPage: options.devtools, @@ -142,9 +143,7 @@ export async function launch(options: McpLaunchOptions): Promise { } catch (error) { if ( userDataDir && - ((error as Error).message.includes('The browser is already running') || - (error as Error).message.includes('Target closed') || - (error as Error).message.includes('Connection closed')) + (error as Error).message.includes('The browser is already running') ) { throw new Error( `The browser is already running for ${userDataDir}. Use --isolated to run multiple browser instances.`,