Problem
Gemini browser mode fails on Windows with:
ERROR: Gemini browser mode requires Chrome cookies for google.com (missing __Secure-1PSID/__Secure-1PSIDTS).
Root Cause
- Gemini executor uses
chrome-cookies-secure which doesn't work on Windows (requires macOS Keychain/Linux keyring)
- Windows cookie extraction exists (
src/browser/windowsCookies.ts) but is hardcoded to chatgpt.com only (line 130)
- Windows cookie sync is disabled in
loadChromeCookies() (line 31-35)
Solution
- Make
loadWindowsCookies() domain-agnostic, add domainFilter parameter to readChromeCookiesDb() to support google.com (currently hardcoded to chatgpt.com)
- Add Windows-specific loader in Gemini executor, create
loadGeminiCookiesFromWindows() that uses loadWindowsCookies() with 'google.com' filter
- Integrate into Gemini executor, try Windows extraction first on Windows before falling back to
chrome-cookies-secure
- Export
resolveCookieFilePath() from chromeCookies.ts for cookie path resolution
Files to Modify
src/browser/windowsCookies.ts, add domain filter parameter
src/gemini-web/executor.ts, add Windows cookie loader
src/browser/chromeCookies.ts, export resolveCookieFilePath
Dependencies
All required dependencies already exist (DPAPI via @primno/dpapi, sqlite3, PowerShell)
Note
App-bound cookies (v20) may still fail DPAPI decryption, which is why Windows cookie sync was originally disabled. This should work for most cases.
Problem
Gemini browser mode fails on Windows with:
Root Cause
chrome-cookies-securewhich doesn't work on Windows (requires macOS Keychain/Linux keyring)src/browser/windowsCookies.ts) but is hardcoded tochatgpt.comonly (line 130)loadChromeCookies()(line 31-35)Solution
loadWindowsCookies()domain-agnostic, adddomainFilterparameter toreadChromeCookiesDb()to supportgoogle.com(currently hardcoded tochatgpt.com)loadGeminiCookiesFromWindows()that usesloadWindowsCookies()with'google.com'filterchrome-cookies-secureresolveCookieFilePath()fromchromeCookies.tsfor cookie path resolutionFiles to Modify
src/browser/windowsCookies.ts, add domain filter parametersrc/gemini-web/executor.ts, add Windows cookie loadersrc/browser/chromeCookies.ts, exportresolveCookieFilePathDependencies
All required dependencies already exist (DPAPI via
@primno/dpapi, sqlite3, PowerShell)Note
App-bound cookies (v20) may still fail DPAPI decryption, which is why Windows cookie sync was originally disabled. This should work for most cases.