Repository navigation
Closed
Description
Environment
- OS: Windows 11 Home 10.0.26200
- gstack version: 0.11.14.0
- Node.js: v24.13.1
- Bun: 1.2.x (compiled binary)
Bug 1: stdio must be an array — browse.exe won't start
Repro
$ browse status
[browse] Starting server...
[browse] stdio must be an array
Root Cause
cli.ts lines 237 and 239 pass stdio as string 'ignore' to Node.js child_process.spawn. Windows Node.js requires an array.
// Line 237 (launcherCode):
{detached:true,stdio:'ignore',...} // ❌ fails on Windows
// Line 239 (Bun.spawnSync):
Bun.spawnSync([...], { stdio: 'ignore' }); // ❌ fails on WindowsFix
// Line 237:
{detached:true,stdio:['ignore','ignore','ignore'],...} // ✅
// Line 239:
Bun.spawnSync([...], { stdio: ['ignore','ignore','ignore'] }); // ✅After fix + recompile (bun build src/cli.ts --compile --outfile dist/browse.exe), browse works perfectly on Windows.
Bug 2: Cookie import has zero Windows support
Repro
$ browse cookie-import-browser
No Chromium browsers found. Supported: Comet, Chrome, Chromium, Arc, Brave, Edge
Root Cause (4 layers)
getHostPlatform()returnsnullforwin32— browsers never found- No Windows paths —
BrowserInfohasdataDir(macOS) andlinuxDataDirbut nowinDataDir. Windows stores cookies at%LOCALAPPDATA%\Google\Chrome\User Data\Default\Network\Cookies bun:sqlitestubbed tonull—build-node-server.shreplaces it withconst Database = null, so even listing domains fails withDatabase is not a constructor- v20 App-Bound Encryption — All Chromium browsers on Windows (Chrome 127+, Edge 127+) now use v20 encryption. The macOS/Linux decryption pipeline (Keychain/PBKDF2 → AES-128-CBC) cannot decrypt v20. DPAPI alone is insufficient — the key is bound to Chrome's system elevation service.
Solution: Edge CDP bypass
We found and verified a complete workaround:
- Edge (unlike Chrome) allows
--remote-debugging-porton its default profile - Launch Edge with debugging → connect via CDP WebSocket
Storage.getCookiesreturns all cookies in plaintext (bypasses v20 entirely)- Export →
browse cookie-import <file.json>→ injected into Playwright session
Tested: 267 cookies from 72 domains imported. Gmail inbox accessible via headless browse.
Key findings:
Network.getAllCookiesreturns 0 on Windows — must useStorage.getCookies- Chrome blocks remote debugging on its default profile dir (security feature)
- Profile copies don't work with v20 (encryption is path-bound)
Suggested Implementation
| File | Change |
|---|---|
src/cli.ts:237,239 |
stdio string → array |
src/cookie-import-browser.ts |
Add win32 platform, winDataDir, Default/Network/Cookies, CDP import path |
src/write-commands.ts |
URL open: powershell Start-Process on Windows |
dist/bun-polyfill.cjs |
better-sqlite3 polyfill with .query() shim for domain listing |
scripts/build-node-server.sh |
Use better-sqlite3 instead of stubbing to null |
Happy to submit a PR if helpful.
Metadata
Metadata
Assignees
Labels
No labels
Activity
BigOtis commentedon Mar 24, 2026
Ran into the same bug, would love the PR
garrytan commentedon Mar 25, 2026
Fixed in a3e2295 —
stdio: 'ignore'changed tostdio: ['ignore', 'ignore', 'ignore']array format for Bun Windows compatibility.fix: use stdio array format for Bun Windows compatibility
fix: Windows browse — stdio array format for Bun compatibility (v0.11…
fix: Windows browse — stdio array format for Bun compatibility (v0.11…
fix: use stdio array format for Bun Windows compatibility
fix: Windows browse — stdio array format for Bun compatibility (v0.11…