From ce4877d945b34e5da0c094717d947018b3860204 Mon Sep 17 00:00:00 2001 From: kevinneung <94151024+kevinneung@users.noreply.github.com> Date: Mon, 12 May 2025 17:08:07 -0700 Subject: [PATCH] fix: Add required --user-data-dir flag when launching Chrome with remote debugging port --- src/services/browser/BrowserSession.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/browser/BrowserSession.ts b/src/services/browser/BrowserSession.ts index 5690a9f9c4..208b264cbe 100644 --- a/src/services/browser/BrowserSession.ts +++ b/src/services/browser/BrowserSession.ts @@ -148,7 +148,7 @@ export class BrowserSession { // Instead of using any default flags, use a minimal set to ensure session persistence // This closely mimics running "google-chrome-stable --remote-debugging-port=9222 --user-data-dir=/path/to/profile" from the CLI - const userDataDir = path.join(require('os').tmpdir(), "chrome-debug-profile") + const userDataDir = path.join(require("os").tmpdir(), "chrome-debug-profile") const chromeFlags = [ "--remote-debugging-port=" + DEBUG_PORT, `--user-data-dir=${userDataDir}`, @@ -167,7 +167,7 @@ export class BrowserSession { `--remote-debugging-port=${DEBUG_PORT}`, `--user-data-dir=${userDataDir}`, "--disable-notifications", - "chrome://newtab" + "chrome://newtab", ] // Spawn Chrome as a detached process