File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,7 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
8383 } ) ;
8484 }
8585
86- const args : LaunchOptions [ 'args' ] = [
87- '--remote-debugging-pipe' ,
88- '--no-first-run' ,
89- '--hide-crash-restore-bubble' ,
90- ] ;
86+ const args : LaunchOptions [ 'args' ] = [ '--hide-crash-restore-bubble' ] ;
9187 if ( customDevTools ) {
9288 args . push ( `--custom-devtools-frontend=file://${ customDevTools } ` ) ;
9389 }
@@ -111,11 +107,11 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
111107 args,
112108 } ) ;
113109 } catch ( error ) {
114- // TODO: check browser logs for `Failed to create a ProcessSingleton for
115- // your profile directory` instead.
116110 if (
117111 userDataDir &&
118- ( error as Error ) . message . includes ( 'The browser is already running' )
112+ ( ( error as Error ) . message . includes ( 'The browser is already running' ) ||
113+ ( error as Error ) . message . includes ( 'Target closed' ) ||
114+ ( error as Error ) . message . includes ( 'Connection closed' ) )
119115 ) {
120116 throw new Error (
121117 `The browser is already running for ${ userDataDir } . Use --isolated to run multiple browser instances.` ,
You can’t perform that action at this time.
0 commit comments