-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
[Bug]: Intermittent browser command failures on Windows (gateway closed 1000/1006, handshake timeout) #48461
Description
Bug type
Regression (worked before, now fails)
Summary
I'm seeing intermittent failures with openclaw browser commands on Windows.
The browser appears correctly configured, Chrome is detected, and openclaw browser status --json sometimes works, but browser actions like start, tabs, open, and profiles frequently fail with:
• gateway closed (1000 normal closure): no close reason
• gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway logs also show handshake timeout and closed before connect.
───
Environment
• OpenClaw: 2026.3.13 (61d171a)
• OS: Windows
• Node: tested on both:
• v25.8.1
• v22.22.1
• Browser: Google Chrome
• Chrome path:
C:\Program Files\Google\Chrome\Application\chrome.exe
───
Browser config
"browser": {
"enabled": true,
"defaultProfile": "openclaw",
"executablePath": "C:\Program Files\Google\Chrome\Application\chrome.exe",
"headless": false
}
Also using:
"tools": {
"profile": "coding",
"allow": ["browser"]
}
───
What works
These work:
openclaw config get browser
openclaw browser --help
openclaw skills list
openclaw channels status
This also sometimes works:
openclaw browser --browser-profile openclaw status --json
Example output:
{
"enabled": true,
"profile": "openclaw",
"driver": "openclaw",
"transport": "cdp",
"running": false,
"cdpReady": false,
"cdpHttp": false,
"pid": null,
"cdpPort": 18800,
"cdpUrl": "http://127.0.0.1:18800",
"detectedExecutablePath": "C:\Program Files\Google\Chrome\Application\chrome.exe",
"detectError": null
}
At least once, openclaw browser start succeeded and launched Chrome.
───
What fails
These fail intermittently:
openclaw browser start
openclaw browser tabs
openclaw browser open https://www.google.com
openclaw browser profiles
Typical error:
gateway connect failed: Error: gateway closed (1000):
Error: gateway closed (1000 normal closure): no close reason
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: C:\Users\Fran.openclaw\openclaw.json
Bind: loopback
Sometimes instead:
Error: gateway closed (1006 abnormal closure (no close frame)): no close reason
───
Relevant logs
[gateway/ws] handshake timeout conn=... remote=127.0.0.1
[gateway/ws] {"cause":"handshake-timeout","handshake":"failed","durationMs":4116,"host":"127.0.0.1:18789","handshakeMs":3002} closed before connect conn=... remote=127.0.0.1 ... code=1000 reason=n/a
Also saw:
[browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
[gateway] listening on ws://127.0.0.1:18789
───
Notes
• This does not seem to be a simple config issue:
• browser.enabled = true
• Chrome path is valid
• detectError = null
• Chrome launches directly from PowerShell
• The issue seems more specific to browser/gateway RPC behavior.
• Reinstalling OpenClaw and moving from Node 25 to Node 22 did not fully resolve it.
───
Expected behavior
Browser commands should consistently connect and either:
• work, or
• return a clear browser-specific error
They should not intermittently fail with generic 1000/1006 gateway closures and handshake timeouts.
Steps to reproduce
- Configure browser in ~/.openclaw/openclaw.json with:
• "browser.enabled": true
• "browser.defaultProfile": "openclaw"
• "browser.executablePath": "C:\Program Files\Google\Chrome\Application\chrome.exe"
• "browser.headless": false
- Start the gateway:
openclaw gateway start
- Confirm the browser profile is detectable:
openclaw browser --browser-profile openclaw status --json
- Run browser actions:
openclaw browser start
openclaw browser tabs
openclaw browser open https://www.google.com
- Observe intermittent failures with:
• gateway closed (1000 normal closure)
• gateway closed (1006 abnormal closure)
• gateway logs showing handshake timeout
Si quieres algo todavía más corto, incluso esto sirve:
- Start OpenClaw on Windows.
- Configure browser to use local Chrome.
- Run:
openclaw browser --browser-profile openclaw status --json
openclaw browser start
openclaw browser tabs
- Observe intermittent 1000/1006 gateway closures and handshake timeout in logs.
Expected behavior
Browser commands should consistently connect through the gateway and control the managed browser profile without intermittent WebSocket failures.
Specifically:
• openclaw browser status --json should return browser state reliably
• openclaw browser start should start the openclaw browser profile
• openclaw browser tabs should list open tabs (or return an empty list if none exist)
• openclaw browser open https://www.google.com should open a new tab successfully
If something is wrong, OpenClaw should return a clear browser-specific error instead of generic 1000/1006 gateway closures or handshake timeouts.
Actual behavior
Browser commands are intermittent.
• openclaw browser status --json sometimes works and correctly detects Chrome
• openclaw browser start sometimes launches Chrome, but often fails
• openclaw browser tabs, openclaw browser open, and openclaw browser profiles frequently fail with:
• gateway closed (1000 normal closure): no close reason
• gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway logs also show:
• handshake timeout
• closed before connect
So the browser is sometimes partially reachable, but browser-related commands are not stable or reliable.
OpenClaw version
2026.3.13 (61d171a)
Operating system
Windows 11
Install method
npm global
Model
openai-codex/gpt-5.4
Provider / routing chain
openclaw -> openai-codex
Config file / key location
~/.openclaw/openclaw.json ; browser.enabled ; browser.defaultProfile ; browser.executablePath ; tools.profile ; tools.allow
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response