-
Notifications
You must be signed in to change notification settings - Fork 817
Description
Description
�gent-browser v0.9.1 does not work on Windows due to two issues:
Bug 1: Rust native binary hardcodes Unix socket path
The CLI entry point (�in/agent-browser.js) spawns the native Rust binary (�gent-browser-win32-x64.exe). This binary always looks for a Unix domain socket at ~/.agent-browser/default.sock, which doesn't exist on Windows.
The Node.js daemon (dist/daemon.js) correctly detects Windows and uses TCP on localhost instead:
// daemon.js line 326-333
if (isWindows) {
const port = getPortForSession(currentSession);
const portFile = getPortFile();
fs.writeFileSync(portFile, port.toString());
server.listen(port, '127.0.0.1', () => {});
}But the Rust binary doesn't read the .port file or attempt TCP connection — it only tries the .sock path.
Error output:
✗ Daemon failed to start (socket: C:\Users\<user>\.agent-browser\default.sock)
Bug 2: Node.js daemon crashes after first TCP connection
When starting the Node.js daemon directly via startDaemon(), it starts and listens on TCP correctly. However, it crashes (exit code 1) shortly after receiving the first client connection. No error message is produced — it just dies silently.
Steps to reproduce:
- Install on Windows:
pm install -g agent-browser && agent-browser install - Run: �gent-browser open https://example.com
- Observe: ✗ Daemon failed to start (socket: ...default.sock)
- Workaround attempt — start Node daemon directly:
ode -e require('agent-browser/dist/daemon.js').startDaemon() - Daemon starts and listens on TCP port
- Connect to port → daemon crashes within seconds
Environment
- OS: Windows 11 (10.0.22631) x64
- Node.js: v25.6.0
- agent-browser: 0.9.1
- Chromium: Installed via �gent-browser install --with-deps
Expected Behavior
�gent-browser should work on Windows, using TCP sockets (as the Node.js daemon already implements) or Windows named pipes.
Suggested Fix
- The Rust binary should check for .port file and connect via TCP on Windows (matching the Node.js daemon behavior)
- The Node.js daemon's TCP server should not crash after receiving connections
Workaround
Using
px playwright screenshot for headless browser automation on Windows in the meantime.