My claude code on wsl (debian) claims the cookie's can't be imported for this reason. I'm not sure if it is lying to me, but thought I'd pass this along.
Title: cookie-import-browser fails on Linux — macOS-only path detection
Environment:
- OS: Ubuntu on WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- gstack version: 0.9.4.1
- Browser: google-chrome-stable installed at /usr/bin/google-chrome-stable
- Chrome profile: ~/.config/google-chrome/Default/
- Cookie DB exists: ~/.config/google-chrome/Default/Cookies (36KB, valid SQLite)
What happens:
$ browse cookie-import-browser
[browse] Starting server...
No Chromium browsers found. Supported: Comet, Chrome, Arc, Brave, Edge
Root cause:
findInstalledBrowsers() in browse/src/cookie-import-browser.ts (line ~106) is hardcoded to macOS paths:
export function findInstalledBrowsers(): BrowserInfo[] {
const appSupport = path.join(os.homedir(), 'Library', 'Application Support');
return BROWSER_REGISTRY.filter(b => {
const dbPath = path.join(appSupport, b.dataDir, 'Default', 'Cookies');
try { return fs.existsSync(dbPath); } catch { return false; }
});
}
It only checks ~/Library/Application Support//Default/Cookies (macOS). On Linux, Chrome stores cookies at
~/.config/google-chrome/Default/Cookies, which is never checked.
Additionally, the cookie decryption uses macOS Keychain (keychainService field in BROWSER_REGISTRY). On Linux, Chrome encrypts cookies
using PBKDF2 with either a GNOME Keyring-stored key or the hardcoded password "peanuts" with salt "saltysalt" (1 iteration, 16-byte
AES-128-CBC key).
What needs to change:
- Platform-aware path detection — check ~/.config/google-chrome/ on Linux, ~/Library/Application Support/Google/Chrome/ on macOS
- Platform-aware cookie decryption — use PBKDF2 "peanuts" key (or GNOME Keyring/libsecret) on Linux instead of macOS Keychain
- Update BROWSER_REGISTRY with per-platform dataDir values
Linux Chrome data directories:
- Chrome: ~/.config/google-chrome/
- Brave: ~/.config/BraveSoftware/Brave-Browser/
- Edge: ~/.config/microsoft-edge/
- Chromium: ~/.config/chromium/
My claude code on wsl (debian) claims the cookie's can't be imported for this reason. I'm not sure if it is lying to me, but thought I'd pass this along.
Title: cookie-import-browser fails on Linux — macOS-only path detection
Environment:
What happens:
$ browse cookie-import-browser
[browse] Starting server...
No Chromium browsers found. Supported: Comet, Chrome, Arc, Brave, Edge
Root cause:
findInstalledBrowsers() in browse/src/cookie-import-browser.ts (line ~106) is hardcoded to macOS paths:
export function findInstalledBrowsers(): BrowserInfo[] {
const appSupport = path.join(os.homedir(), 'Library', 'Application Support');
return BROWSER_REGISTRY.filter(b => {
const dbPath = path.join(appSupport, b.dataDir, 'Default', 'Cookies');
try { return fs.existsSync(dbPath); } catch { return false; }
});
}
It only checks ~/Library/Application Support//Default/Cookies (macOS). On Linux, Chrome stores cookies at
~/.config/google-chrome/Default/Cookies, which is never checked.
Additionally, the cookie decryption uses macOS Keychain (keychainService field in BROWSER_REGISTRY). On Linux, Chrome encrypts cookies
using PBKDF2 with either a GNOME Keyring-stored key or the hardcoded password "peanuts" with salt "saltysalt" (1 iteration, 16-byte
AES-128-CBC key).
What needs to change:
Linux Chrome data directories: