fix(windows): robust daemon startup and port discovery#314
fix(windows): robust daemon startup and port discovery#314feketegabor wants to merge 3 commits intovercel-labs:mainfrom
Conversation
|
Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
28d2d81 to
69df523
Compare
|
wait for it |
samonjoat
left a comment
There was a problem hiding this comment.
✅ Verified on Windows 11 (x86_64), agent-browser v0.9.0 base, Rust 1.93.0
Built from this branch and tested against the installed v0.9.0 Node.js package. All tests pass:
agent-browser open <url>— daemon starts reliably- Rapid close/reopen cycles (3x) — no "Daemon failed to start" errors
- Named sessions (
--session alpha,--session beta) — concurrent sessions work correctly .portfile created at~/.agent-browser/default.port— port discovery mechanism is functional- Windows excluded port range (50000–50059 via
netsh) is present on this system — the fallback port mechanism correctly avoids conflicts
Environment:
- OS: Windows 11 (MSYS_NT-10.0)
- Node.js: v22.x
- Shell: Git Bash
- Excluded TCP ports: 50000–50059
The increased timeouts (50ms → 200ms) and PowerShell Start-Process launch strategy resolve the race condition described in #37. The .port file fallback addresses #132. This should be merged.
|
Please, please merge and release this : / Windows users will thank you. |
|
@mmjang While the maintainers don't merge this, you can build it from his source repo. I did it, and it works flawlessly. By the way, thanks @feketegabor |
- Start daemon via PowerShell Start-Process to avoid Windows path/escaping issues - Strip \\\?\ prefix to prevent Windows dialog errors - Allow daemon to fall back to an OS-assigned port and persist it to a .port file - Read the .port file on the CLI to connect to the correct session port - Increase TCP readiness timeouts on Windows
145a023 to
fa882d7
Compare
Summary
Fixes
Fixes #132
Fixes #37
Fixes #91
Fixes #89
Testing