openclaw - 💡(How to fix) Fix [Bug]: gateway:channels.status internal WebSocket auth fails with token_mismatch (v2026.4.29) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#75898Fetched 2026-05-03 04:44:33
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

The internal gateway:channels.status component consistently fails to authenticate when connecting back to its own Gateway WebSocket endpoint, producing token_mismatch errors every ~5-10 minutes.

Error Message

unauthorized conn=1ea6aa22-... peer=127.0.0.1:47618->127.0.0.1:18789 
client=gateway:channels.status backend v2026.4.29 
role=operator scopes=0 auth=token device=no 
reason=token_mismatch

Root Cause

The internal gateway:channels.status component consistently fails to authenticate when connecting back to its own Gateway WebSocket endpoint, producing token_mismatch errors every ~5-10 minutes.

Code Example

unauthorized conn=1ea6aa22-... peer=127.0.0.1:47618->127.0.0.1:18789 
client=gateway:channels.status backend v2026.4.29 
role=operator scopes=0 auth=token device=no 
reason=token_mismatch

---

gateway connect failed: GatewayClientRequestError: unauthorized: gateway token mismatch (provide gateway auth token)
RAW_BUFFERClick to expand / collapse

Description

The internal gateway:channels.status component consistently fails to authenticate when connecting back to its own Gateway WebSocket endpoint, producing token_mismatch errors every ~5-10 minutes.

Environment

  • OpenClaw: v2026.4.29
  • OS: Linux 6.17.0-22-generic (x64)
  • Node: v22.22.2
  • Gateway mode: local, bind=loopback, port=18789
  • Auth mode: token (configured gateway.auth.token)

Logs

unauthorized conn=1ea6aa22-... peer=127.0.0.1:47618->127.0.0.1:18789 
client=gateway:channels.status backend v2026.4.29 
role=operator scopes=0 auth=token device=no 
reason=token_mismatch

Recurrence

The error repeats every ~5-10 minutes, accumulating ~18+ times per day. It has persisted across 3 different Gateway process restarts (different PIDs). The scopes=0 in the log suggests the internal token used by channels.status has no authorization scopes, which does not match the configured admin token.

Impact

No functional impact observed — channels (Feishu, QQ Bot, WeChat), cron tasks, health API, and WebSocket connections all work correctly. This appears to be a non-fatal internal auth issue.

Steps to Reproduce

  1. Configure gateway with gateway.auth.mode=token
  2. Start gateway
  3. Check logs for token_mismatch entries from gateway:channels.status
  4. Observe recurring unauthorized attempts

Symptoms

gateway connect failed: GatewayClientRequestError: unauthorized: gateway token mismatch (provide gateway auth token)

Note: the error appears at the CLI level when openclaw status or similar commands trigger the internal channels.status probe.

extent analysis

TL;DR

The token_mismatch error in the gateway:channels.status component may be resolved by verifying the configuration of the gateway.auth.token and ensuring it matches the expected authorization scopes.

Guidance

  • Review the gateway.auth.token configuration to ensure it is correctly set and matches the expected token for the operator role with the necessary authorization scopes.
  • Check the Gateway logs for any indications of token validation errors or mismatches to understand the specific issue with the token.
  • Verify that the channels.status component is using the correct token and that the token is not being rotated or updated in a way that would cause the mismatch.
  • Consider checking the documentation for the gateway.auth.mode=token configuration to ensure that all necessary settings are properly configured.

Example

No specific code example is provided as the issue seems to be related to configuration rather than code.

Notes

The fact that the error is recurring and the scopes=0 in the log suggests a potential issue with the token configuration or the way the channels.status component is using the token. The lack of functional impact suggests that this may be a non-critical issue, but resolving it could improve the overall security and stability of the system.

Recommendation

Apply workaround: Verify and correct the gateway.auth.token configuration to ensure it matches the expected token and authorization scopes, as this seems to be the most likely cause of the token_mismatch error.

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