Files
openclaw/docs/channels/troubleshooting.md
Peter Steinberger 60fea81cf1 fix(telegram): harden polling transport liveness (#69476)
* fix(telegram): release undici dispatchers via TelegramTransport.close()

TelegramTransport now exposes an explicit close() that destroys every
owned undici dispatcher (default Agent plus lazily-created IPv4 and
IP-pinned fallback Agents) and the TCP sockets they hold. Dispatcher
constructors are also given bounded keep-alive defaults
(keepAliveTimeout, keepAliveMaxTimeout, connections, pipelining) as a
defence-in-depth layer so the pool cannot grow unbounded even if a
caller forgets to call close().

Without this, every transport that went through a fallback retry left
its fallback Agents anchored forever in a closure; long-running polling
sessions accumulated hundreds of ESTABLISHED keep-alive sockets to
api.telegram.org, saturating the per-IP quota on upstream forward
proxies and making the currently-active outbound node time out while
every other node still tested healthy.

Mock dispatchers in fetch.test.ts gain destroy() spies so the close()
chain is assertable. Call sites that built caller-owned transports from
globalThis.fetch (delivery.resolve-media, test helpers) return an async
no-op close(), matching the new required surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(telegram): dispose polling transport on shutdown and dirty rebuild

Every recoverable network error and stall-watchdog trip sets
TelegramPollingTransportState.#transportDirty so the next polling
cycle rebuilds the transport inside acquireForNextCycle(). Previously
the rebuild simply overwrote the field, leaving the old transport's
keep-alive sockets anchored in the now-unreferenced dispatcher — the
polling loop has no natural GC point for these resources, and Node's
object GC never touches OS-level sockets.

acquireForNextCycle() now closes the previous transport (fire-and-
forget so the polling cycle is not blocked by a slow destroy) before
swapping in the rebuilt one. dispose() is a new method that the owning
TelegramPollingSession calls from the finally block of runUntilAbort(),
so a single transport is always tied to a single polling session
lifetime. After dispose(), acquireForNextCycle() returns undefined to
prevent zombie rebuilds.

Under high sustained polling traffic over long-lived sessions, this is
what stops the per-gateway connection count to api.telegram.org from
growing indefinitely and saturating upstream proxy quotas.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(changelog): note Telegram undici dispatcher lifecycle fix

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(telegram): disable HTTP/2 for all Telegram polling dispatchers

Undici 8 enables HTTP/2 ALPN by default, but Telegram's long-polling
connections stall on Windows due to IPv6 + H2 multiplexing issues. The
core fetch-guard already sets allowH2:false for guarded paths, but the
Telegram extension creates its own Agent/ProxyAgent/EnvHttpProxyAgent
instances directly from undici without this flag.

Apply allowH2:false to all dispatcher constructors in the Telegram
transport layer, matching the approach used in src/infra/net/undici-runtime.ts.

Fixes #66885

* fix: avoid false telegram polling stall restarts

* fix(telegram): publish polling health liveness

---------

Co-authored-by: Ethan Chen <ethanbit@qq.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Magicray1217 <magicray1217@users.noreply.github.com>
Co-authored-by: aoao <aoao@openclaw>
2026-04-20 23:03:57 +01:00

9.2 KiB

summary, read_when, title
summary read_when title
Fast channel level troubleshooting with per channel failure signatures and fixes
Channel transport says connected but replies fail
You need channel specific checks before deep provider docs
Channel Troubleshooting

Channel troubleshooting

Use this page when a channel connects but behavior is wrong.

Command ladder

Run these in order first:

openclaw status
openclaw gateway status
openclaw logs --follow
openclaw doctor
openclaw channels status --probe

Healthy baseline:

  • Runtime: running
  • Connectivity probe: ok
  • Capability: read-only, write-capable, or admin-capable
  • Channel probe shows transport connected and, where supported, works or audit ok

WhatsApp

WhatsApp failure signatures

Symptom Fastest check Fix
Connected but no DM replies openclaw pairing list whatsapp Approve sender or switch DM policy/allowlist.
Group messages ignored Check requireMention + mention patterns in config Mention the bot or relax mention policy for that group.
Random disconnect/relogin loops openclaw channels status --probe + logs Re-login and verify credentials directory is healthy.

Full troubleshooting: /channels/whatsapp#troubleshooting

Telegram

Telegram failure signatures

Symptom Fastest check Fix
/start but no usable reply flow openclaw pairing list telegram Approve pairing or change DM policy.
Bot online but group stays silent Verify mention requirement and bot privacy mode Disable privacy mode for group visibility or mention bot.
Send failures with network errors Inspect logs for Telegram API call failures Fix DNS/IPv6/proxy routing to api.telegram.org.
Polling stalls or reconnects slowly openclaw logs --follow for polling diagnostics Upgrade, then check proxy/DNS/IPv6 if getUpdates keeps timing out.
setMyCommands rejected at startup Inspect logs for BOT_COMMANDS_TOO_MUCH Reduce plugin/skill/custom Telegram commands or disable native menus.
Upgraded and allowlist blocks you openclaw security audit and config allowlists Run openclaw doctor --fix or replace @username with numeric sender IDs.

Full troubleshooting: /channels/telegram#troubleshooting

Discord

Discord failure signatures

Symptom Fastest check Fix
Bot online but no guild replies openclaw channels status --probe Allow guild/channel and verify message content intent.
Group messages ignored Check logs for mention gating drops Mention bot or set guild/channel requireMention: false.
DM replies missing openclaw pairing list discord Approve DM pairing or adjust DM policy.

Full troubleshooting: /channels/discord#troubleshooting

Slack

Slack failure signatures

Symptom Fastest check Fix
Socket mode connected but no responses openclaw channels status --probe Verify app token + bot token and required scopes; watch for botTokenStatus / appTokenStatus = configured_unavailable on SecretRef-backed setups.
DMs blocked openclaw pairing list slack Approve pairing or relax DM policy.
Channel message ignored Check groupPolicy and channel allowlist Allow the channel or switch policy to open.

Full troubleshooting: /channels/slack#troubleshooting

iMessage and BlueBubbles

iMessage and BlueBubbles failure signatures

Symptom Fastest check Fix
No inbound events Verify webhook/server reachability and app permissions Fix webhook URL or BlueBubbles server state.
Can send but no receive on macOS Check macOS privacy permissions for Messages automation Re-grant TCC permissions and restart channel process.
DM sender blocked openclaw pairing list imessage or openclaw pairing list bluebubbles Approve pairing or update allowlist.

Full troubleshooting:

Signal

Signal failure signatures

Symptom Fastest check Fix
Daemon reachable but bot silent openclaw channels status --probe Verify signal-cli daemon URL/account and receive mode.
DM blocked openclaw pairing list signal Approve sender or adjust DM policy.
Group replies do not trigger Check group allowlist and mention patterns Add sender/group or loosen gating.

Full troubleshooting: /channels/signal#troubleshooting

QQ Bot

QQ Bot failure signatures

Symptom Fastest check Fix
Bot replies "gone to Mars" Verify appId and clientSecret in config Set credentials or restart the gateway.
No inbound messages openclaw channels status --probe Verify credentials on the QQ Open Platform.
Voice not transcribed Check STT provider config Configure channels.qqbot.stt or tools.media.audio.
Proactive messages not arriving Check QQ platform interaction requirements QQ may block bot-initiated messages without recent interaction.

Full troubleshooting: /channels/qqbot#troubleshooting

Matrix

Matrix failure signatures

Symptom Fastest check Fix
Logged in but ignores room messages openclaw channels status --probe Check groupPolicy, room allowlist, and mention gating.
DMs do not process openclaw pairing list matrix Approve sender or adjust DM policy.
Encrypted rooms fail openclaw matrix verify status Re-verify the device, then check openclaw matrix verify backup status.
Backup restore is pending/broken openclaw matrix verify backup status Run openclaw matrix verify backup restore or rerun with a recovery key.
Cross-signing/bootstrap looks wrong openclaw matrix verify bootstrap Repair secret storage, cross-signing, and backup state in one pass.

Full setup and config: Matrix