Bug type
Regression (worked before, now fails)
Summary
When running OpenClaw in an environment where proxy environment variables are set (HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY), browser control fails even though Chrome starts successfully.
Observed behavior:
- Chrome/Brave/Edge launches and listens on
127.0.0.1:<cdpPort>
- OpenClaw reports:
Failed to start Chrome CDP on port 18800 for profile "openclaw"
isChromeReachable() returns false when probing http://127.0.0.1:<port>/json/version
Steps to reproduce
export ALL_PROXY=http://proxy.example.com:8080
openclaw gateway run then openclaw browser start
- Chrome launches; OpenClaw fails with "Error: gateway timeout after 15000ms
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/xunye/.openclaw/openclaw.json
Bind: loopback".
Configure browser in openclaw.json:
{
"browser": {
"enabled": true,
"remoteCdpTimeoutMs": 1500,
"remoteCdpHandshakeTimeoutMs": 3000,
"color": "#FF4500",
"executablePath": "/usr/bin/google-chrome",
"headless": false,
"noSandbox": true,
"attachOnly": false,
"defaultProfile": "openclaw",
"profiles": {
"openclaw": {
"cdpPort": 18800,
"color": "#FF4500"
}
}
},
}
Expected behavior
When proxy environment variables (HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY) are set, OpenClaw should:
-
Automatically add loopback to no_proxy — Ensure 127.0.0.1, localhost, and ::1 are in no_proxy / NO_PROXY so CDP health checks to local Chrome bypass the proxy.
-
Succeed at browser control — After Chrome starts, isChromeReachable() should succeed when probing http://127.0.0.1:<cdpPort>/json/version, and openclaw browser start should complete without error.
-
Support all proxy env vars — Treat ALL_PROXY and all_proxy as active proxies (same as HTTP_PROXY / HTTPS_PROXY), since Node/undici uses them for http:// requests.
Actual behavior
- Chrome starts and listens on
127.0.0.1:<cdpPort>.
- OpenClaw’s CDP health checks to
http://127.0.0.1:<port>/json/version are sent through the proxy instead of directly to localhost.
- The probe fails or times out, so
isChromeReachable() returns false.
- OpenClaw reports:
Failed to start Chrome CDP on port 18800 for profile "openclaw".
- Browser control does not work until loopback is added to
no_proxy manually.
OpenClaw version
2026.3.1
Operating system
Ubuntu 24.04
Install method
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Root Cause
Node.js (via undici's EnvHttpProxyAgent) routes HTTP requests through the proxy when HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY is set. CDP health checks to 127.0.0.1 are sent through the corporate proxy instead of directly to localhost, causing them to fail or time out.
If no_proxy / NO_PROXY uses CIDR notation (e.g. 127.0.0.0/8) or omits loopback entries, loopback requests may still be proxied.
Bug type
Regression (worked before, now fails)
Summary
When running OpenClaw in an environment where proxy environment variables are set (
HTTP_PROXY,HTTPS_PROXY, orALL_PROXY), browser control fails even though Chrome starts successfully.Observed behavior:
127.0.0.1:<cdpPort>Failed to start Chrome CDP on port 18800 for profile "openclaw"isChromeReachable()returns false when probinghttp://127.0.0.1:<port>/json/versionSteps to reproduce
export ALL_PROXY=http://proxy.example.com:8080openclaw gateway runthenopenclaw browser startGateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/xunye/.openclaw/openclaw.json
Bind: loopback".
Configure browser in openclaw.json:
Expected behavior
When proxy environment variables (
HTTP_PROXY,HTTPS_PROXY, orALL_PROXY) are set, OpenClaw should:Automatically add loopback to
no_proxy— Ensure127.0.0.1,localhost, and::1are inno_proxy/NO_PROXYso CDP health checks to local Chrome bypass the proxy.Succeed at browser control — After Chrome starts,
isChromeReachable()should succeed when probinghttp://127.0.0.1:<cdpPort>/json/version, andopenclaw browser startshould complete without error.Support all proxy env vars — Treat
ALL_PROXYandall_proxyas active proxies (same asHTTP_PROXY/HTTPS_PROXY), since Node/undici uses them forhttp://requests.Actual behavior
127.0.0.1:<cdpPort>.http://127.0.0.1:<port>/json/versionare sent through the proxy instead of directly to localhost.isChromeReachable()returns false.Failed to start Chrome CDP on port 18800 for profile "openclaw".no_proxymanually.OpenClaw version
2026.3.1
Operating system
Ubuntu 24.04
Install method
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Root Cause
Node.js (via undici's
EnvHttpProxyAgent) routes HTTP requests through the proxy whenHTTP_PROXY,HTTPS_PROXY, orALL_PROXYis set. CDP health checks to127.0.0.1are sent through the corporate proxy instead of directly to localhost, causing them to fail or time out.If
no_proxy/NO_PROXYuses CIDR notation (e.g.127.0.0.0/8) or omits loopback entries, loopback requests may still be proxied.