#gateway connect failed

1 messages · Page 1 of 1 (latest)

rose briar
#

05:58:01+00:00 error gateway connect failed: GatewayClientRequestError: protocol mismatch
05:58:01+00:00 error gateway connect failed: GatewayClientRequestError: protocol mismatch
05:58:01+00:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"protocol-mismatch","handshake":"failed","durationMs":12,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"c726b820-7c51-41dd-9d37-e6d8260f7c7d","host":"127.0.0.1:18789","remoteAddr":"127.0.0.1","remotePort":65423,"localAddr":"127.0.0.1","localPort":18789,"endpoint":"127.0.0.1:65423->127.0.0.1:18789","minProtocol":3,"maxProtocol":3,"expectedProtocol":4,"minimumProbeProtocol":4,"client":"cli","mode":"cli","version":"2026.5.6","platform":"darwin","instanceId":"9e38d9ce-40f3-4b1f-8a0c-5ea453a9817c"} closed before connect conn=b1437c23-e940-417e-8899-e52bc62c4841 peer=127.0.0.1:65423->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=connect failed
05:58:02+00:00 warn gateway/ws {"subsystem":"gateway/ws"} protocol mismatch conn=2fa7d434-e1c7-41cf-b1e5-f44df7f0cb98 peer=127.0.0.1:65425->127.0.0.1:18789 remote=127.0.0.1 remotePort=65425 client=cli cli v2026.5.6 min=3 max=3 expected=4 probeMin=4 instance=3b129536-800b-44cb-a87a-dc05384295cd
05:58:02+00:00 error gateway connect failed: GatewayClientRequestError: protocol mismatch
05:58:02+00:00 error gateway connect failed: GatewayClientRequestError: protocol mismatc

send me a prompt so my agent fixes it by itself

ruby kettleBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

vague pantherBOT
wispy shadowBOT
# rose briar 05:58:01+00:00 error gateway connect failed: GatewayClientRequestError: protocol...

That log is a version/protocol split: the CLI says v2026.5.6 maxProtocol=3, but the gateway expects protocol 4. So the fix is almost certainly “make every OpenClaw binary/service come from the same version, then restart the gateway.”

Paste this into your local agent:

Fix my OpenClaw gateway protocol mismatch.

Symptom:
- `GatewayClientRequestError: protocol mismatch`
- logs show CLI/client `version=2026.5.6`, `minProtocol=3`, `maxProtocol=3`
- gateway reports `expectedProtocol=4` / `minimumProbeProtocol=4`
- platform is macOS/darwin, gateway host is `127.0.0.1:18789`

Goal:
Make the OpenClaw CLI, gateway service, dashboard/UI, and any global/npx install resolve to the same current version, then restart the gateway and verify `openclaw doctor` / `openclaw gateway status` no longer show protocol mismatch.
wispy shadowBOT
# rose briar 05:58:01+00:00 error gateway connect failed: GatewayClientRequestError: protocol...
Rules:
- First run `openclaw --version`, `which openclaw`, `npm root -g`, `npm list -g openclaw --depth=0`, and inspect whether nvm is involved.
- Check for multiple OpenClaw installs or stale launchd service paths, especially old nvm Node paths.
- Do not delete user data or sessions unless you explain why and ask first.
- Prefer updating/reinstalling the OpenClaw package and reinstalling/restarting the macOS gateway service.
- After changes, run `openclaw --version`, `openclaw gateway status`, and `openclaw doctor`.
- If the service still points at an old Node/global package path, uninstall OpenClaw from the old nvm Node version, install it under the intended Node version, then reinstall/restart the gateway service.

Useful docs:
- <https://docs.openclaw.ai/gateway/troubleshooting>
- <https://docs.openclaw.ai/gateway/protocol>

If it gets stuck, have it paste back the outputs of openclaw --version, which openclaw, openclaw gateway status, and the first protocol-mismatch log after restart.