openclaw - 💡(How to fix) Fix Loopback Control UI WS preauth closes log as warn [1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73004Fetched 2026-04-28 06:28:47
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
closed ×1

When the gateway is running on loopback and the Control UI connects from the same origin, some browser websocket connections can close before auth completes and get logged as WARN even though they are benign local browser traffic.

This makes local startup and diagnostics look unhealthy even when the gateway is actually fine.

Error Message

When the gateway is running on loopback and the Control UI connects from the same origin, some browser websocket connections can close before auth completes and get logged as WARN even though they are benign local browser traffic. Same-origin loopback browser preauth timeouts / early closes should be treated like other noisy local helper traffic and logged at debug, not warn. I verified a narrow local patch that classifies same-origin loopback browser preauth closes separately and demotes those log lines from warn to debug while leaving non-loopback and non-browser traffic unchanged.

Root Cause

When the gateway is running on loopback and the Control UI connects from the same origin, some browser websocket connections can close before auth completes and get logged as WARN even though they are benign local browser traffic.

This makes local startup and diagnostics look unhealthy even when the gateway is actually fine.

Fix Action

Fix / Workaround

Notes

I verified a narrow local patch that classifies same-origin loopback browser preauth closes separately and demotes those log lines from warn to debug while leaving non-loopback and non-browser traffic unchanged.

Code Example

handshake timeout conn=... peer=/ remote=127.0.0.1
closed before connect conn=... code=1006 origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 ... Chrome/...
RAW_BUFFERClick to expand / collapse

Summary

When the gateway is running on loopback and the Control UI connects from the same origin, some browser websocket connections can close before auth completes and get logged as WARN even though they are benign local browser traffic.

This makes local startup and diagnostics look unhealthy even when the gateway is actually fine.

Environment

  • OpenClaw: 2026.4.25-beta.8
  • OS: Windows 11
  • Gateway bind: 127.0.0.1:18789
  • Control UI origin: http://127.0.0.1:18789

Reproduction

  1. Start the gateway locally on loopback.
  2. Open the Control UI from the same loopback origin.
  3. Trigger a browser websocket connection that does not finish the preauth handshake.
  4. Watch the gateway log.

Actual

The gateway emits warning-level log lines similar to:

handshake timeout conn=... peer=/ remote=127.0.0.1
closed before connect conn=... code=1006 origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 ... Chrome/...

Expected

Same-origin loopback browser preauth timeouts / early closes should be treated like other noisy local helper traffic and logged at debug, not warn.

Notes

I verified a narrow local patch that classifies same-origin loopback browser preauth closes separately and demotes those log lines from warn to debug while leaving non-loopback and non-browser traffic unchanged.

extent analysis

TL;DR

Apply a patch to classify same-origin loopback browser preauth closes separately and demote their log lines from warn to debug.

Guidance

  • Verify that the issue is specific to same-origin loopback connections by checking the log messages for the presence of 127.0.0.1 in both the peer and host fields.
  • Check the OpenClaw version to ensure it's 2026.4.25-beta.8, as the issue might be specific to this version.
  • Test the proposed patch by applying it to the local environment and verifying that the log level for same-origin loopback browser preauth closes changes from warn to debug.
  • Consider implementing a similar patch in the production environment if the issue is confirmed to be benign and not indicative of a larger problem.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a configuration or patch application.

Notes

The proposed solution assumes that the issue is indeed benign and that demoting the log level will not mask any actual problems. It's essential to monitor the system after applying the patch to ensure that no critical issues are being hidden.

Recommendation

Apply the workaround by patching the system to classify same-origin loopback browser preauth closes separately and demote their log lines from warn to debug, as this will allow for more accurate logging and reduce noise in the system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Loopback Control UI WS preauth closes log as warn [1 participants]