Diagnose OpenClaw Control UI browser and native Android, iOS, or macOS node connection failures across route, auth, pairing, QR/setup-code, and reconnect states
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-node-connect-959ef583d838 ,按照其中的说明把「node-connect」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Goal: fix one exact client against one exact Gateway, then prove that client's fresh connection.
Record the target environment/profile, OpenClaw binary, config/state root, Gateway URL/port, and service before changing anything.
openclaw, proof environment, or similarly named deployment.Identify the target Gateway before changing pairing or auth.
Classify from the request and Gateway log before choosing commands:
client=openclaw-control-ui or mode=webchat.role=node.A phone can be either client. Do not use openclaw qr or openclaw nodes status for a phone browser; those belong to native mobile/node pairing.
Run these through the locked target:
openclaw gateway status --deep
openclaw logs --follow --json
openclaw devices list
openclaw config get gateway.mode
openclaw config get gateway.bind
openclaw config get gateway.remote.url
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.allowTailscale
openclaw config get gateway.tailscale.mode
Have the client retry once while logs are live. Correlate its client ID, mode, platform, address, auth result, device ID, user, and close code. Ignore other paired devices.
Interpret the first failed transition:
token_missing, password_missing, mismatch, or Tailscale identity failure: auth failed before pairing, so an empty pending list is expected.pairing required: route and auth succeeded; approve the exact pending request.authenticated user connected / webchat connected: match the exact client; if followed by 1006, preserve auth/pairing and inspect lifecycle, transport, proxy, or reconnect.1006 without either application-level connected log does not prove auth/pairing; inspect the earlier handshake transition.Choose one topology: same machine, LAN, tailnet, or public reverse proxy. Do not mix them.
gateway.tailscale.mode=off means OpenClaw is not managing Serve/Funnel. It does not prove that Tailscale or an externally managed Serve route is absent.tailscale status --json
tailscale serve status --json
Match the client's URL to the listener/proxy route reaching the locked Gateway.
Restore browser auth before looking for a pairing request:
openclaw dashboard on the Gateway host for a one-time signed handoff. Use --no-open only when the operator can retrieve that host's clipboard, and keep the host browser/clipboard outside agent tooling. Never capture dashboard --json: it can expose the handoff and shared credentials. Never relay, rewrite, or send a loopback handoff URL to a remote phone.gateway.auth.allowTailscale only for that intended trust boundary. Verified Tailscale Control UI auth with browser device identity can skip pairing.After auth succeeds:
pairing required; verified Tailscale identity can skip it.pairing required, re-list devices and approve the exact request ID.1006, preserve auth/pairing and inspect reconnect evidence.Inspect the native route through the locked target without exposing the setup credential:
openclaw qr --json | jq '{gatewayUrl, gatewayUrls, auth, access, accessDowngraded, urlSource}'
For a CLI controlling a remote Gateway, add --remote before --json; it selects gateway.remote.url and remote credentials. If the redaction filter is unavailable, do not run raw QR JSON in agent-visible output.
Verify gatewayUrl and urlSource. The setup code is password-equivalent: have the operator copy it from Control UI → Devices → Pair device, or run openclaw qr --setup-code-only in a terminal outside agent tooling and paste it directly into the official app. Never relay it through agent/chat/tool output. Generate a fresh code after a URL/auth fix or expiry.
If the app reports pairing required:
openclaw devices list
openclaw devices approve --latest # preview only; exits without approval
openclaw devices approve <requestId>
openclaw nodes status
--latest only previews the current request; never treat it as approval. Re-list immediately before the exact-ID command because retries can supersede the request. Never approve by position, age, or similarity.
Before approval, match available request, device/public-key, client, mode/role, platform, address, user, and retry-time facts.
Declare success only after a new attempt made after the final change proves all applicable checks:
openclaw nodes status;A QR/setup code, launched browser, empty pending list, approval, paired-device count, or Tailscale ping proves only one transition.
Report the diagnosis, chosen route/auth lane, exact-client evidence, and any remaining failed transition.