openclaw - ✅(Solved) Fix message tool: 'No active WhatsApp Web listener' error despite channel showing connected [2 pull requests, 1 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#52768Fetched 2026-04-08 01:19:42
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

The \message\ tool consistently returns \Error: No active WhatsApp Web listener (account: default)\ when attempting to send outbound messages, even though inbound messages are flowing normally and \openclaw channels status\ reports the WhatsApp channel as connected.

Error Message

The \message\ tool consistently returns \Error: No active WhatsApp Web listener (account: default)\ when attempting to send outbound messages, even though inbound messages are flowing normally and \openclaw channels status\ reports the WhatsApp channel as connected. 4. Using \message(action=send, target='+44...', message='...')\ fails with the listener error

Root Cause

The \message\ tool consistently returns \Error: No active WhatsApp Web listener (account: default)\ when attempting to send outbound messages, even though inbound messages are flowing normally and \openclaw channels status\ reports the WhatsApp channel as connected.

Fix Action

Workaround

Using WhatsApp Web in the browser as a fallback for outbound sends.

PR fix notes

PR #65758: fix(whatsapp): add reconnect safety timer to connection controller

Description (problem / solution / changelog)

Problem

When the WhatsApp watchdog triggers a reconnect, closeCurrentConnection() nulls the active listener immediately while the reconnect loop sleeps before re-registering. During this gap (up to 30s+ with exponential backoff), inbound messages are silently dropped because there is no active listener to handle them.

There is no mechanism to detect when this gap exceeds a reasonable threshold, so stuck reconnects go unnoticed.

Fix

Add a reconnect safety timer to WhatsAppConnectionController that detects when the listener gap exceeds 90 seconds:

  • closeCurrentConnection() starts a 90s safety timer
  • openConnection() clears the timer on successful reconnect
  • shutdown() clears the timer to prevent dangling timers after exit
  • If the timer fires, it logs a warning indicating the reconnect may be stuck

The timer is scoped to the controller instance and properly cleaned up in all code paths.

Tests

Three new tests in connection-controller.test.ts:

  • Timer fires after 90s timeout when reconnect doesn't complete
  • Timer is cleared when a new connection opens before timeout
  • Timer is cleared on controller shutdown

Related

This PR addresses one root cause behind the widely reported "No active WhatsApp Web listener" family of issues — specifically the reconnect gap where the listener is null while the watchdog reconnect loop is in progress.

See also #65759 (companion PR — adds application-level health probe to detect silent connection failures).

Related user reports:

  • #61250, #56363, #56089 — outbound fails despite connected status
  • #52768, #50231, #50208 — message tool fails with "No active WhatsApp Web listener"
  • #53162, #51493 — cron/announce delivery fails during reconnect
  • #50383, #50489 — proactive sends silently fail
  • #38734 (closed) — original report, partially addressed by #54232 (shared-map fix)

Supersedes #62000 (adapted to current controller-based architecture).

Changed files

  • extensions/whatsapp/src/connection-controller.test.ts (modified, +100/-0)
  • extensions/whatsapp/src/connection-controller.ts (modified, +24/-0)

PR #65759: fix(whatsapp): add application-level health probe to inbound monitor

Description (problem / solution / changelog)

Problem

The WhatsApp inbound monitor relies on the Baileys socket connection state, but a connected socket doesn't guarantee the application layer is healthy. The socket can remain open while the server silently stops delivering messages (e.g. after a server-side session migration or network partition recovery).

The existing watchdog only checks message recency — if no messages arrive in a quiet chat, it can't distinguish "no one is messaging" from "messages aren't being delivered."

Fix

Add a periodic application-level health probe that calls sock.fetchStatus(selfJid) to verify end-to-end delivery capability:

  • Probe runs on each watchdog check interval (default 60s)
  • Single-flight guard prevents concurrent probes from piling up
  • 15s timeout per probe — if fetchStatus hangs, the probe is marked failed but the hung call is left to settle on its own (no leaked promises)
  • 3 consecutive failures trigger a watchdog-style forced reconnect
  • Probe is disabled when fetchStatus is unavailable (older Baileys versions)
  • Timer cleanup on connection close prevents dangling timers

Tests

monitor-health-probe.test.ts (130 lines):

  • Successful probe resets failure counter
  • Consecutive failures trigger forced reconnect
  • Timeout handling (hung fetchStatus)
  • Single-flight guard (probe already in progress)
  • Timer cleanup on connection close
  • Graceful degradation when fetchStatus is missing

Related

This PR addresses another root cause behind the "No active WhatsApp Web listener" family of issues — specifically silent connection failures where the socket stays alive but the application layer is dead.

See also #65758 (companion PR — adds reconnect safety timer to detect stuck reconnects).

Related user reports:

  • #61250, #56363, #56089 — outbound fails despite connected status
  • #52768, #50231, #50208 — message tool fails with "No active WhatsApp Web listener"
  • #53162, #51493 — cron/announce delivery fails
  • #50383, #50489 — proactive sends silently fail
  • #38734 (closed) — original report, partially addressed by #54232 (shared-map fix)

Supersedes #61999 (clean squash onto latest main).

Changed files

  • extensions/whatsapp/src/auto-reply.test-harness.ts (modified, +2/-0)
  • extensions/whatsapp/src/inbound/monitor-health-probe.test.ts (added, +130/-0)
  • extensions/whatsapp/src/inbound/monitor.ts (modified, +94/-0)
  • extensions/whatsapp/src/monitor-inbox.test-harness.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Description

The \message\ tool consistently returns \Error: No active WhatsApp Web listener (account: default)\ when attempting to send outbound messages, even though inbound messages are flowing normally and \openclaw channels status\ reports the WhatsApp channel as connected.

Steps to reproduce

  1. WhatsApp channel is connected and receiving inbound messages normally
  2. Inbound messages arrive and are processed correctly
  3. Replying to the current conversation via the normal reply mechanism works fine
  4. Using \message(action=send, target='+44...', message='...')\ fails with the listener error
  5. \openclaw channels login --channel whatsapp --account default\ reports successful re-link
  6. Gateway restart does not resolve the issue
  7. Sending via WhatsApp Web browser as fallback works correctly

Expected behaviour

\message\ tool sends should work when the channel reports as connected and inbound messages are flowing.

Actual behaviour

All \message(action=send)\ calls fail with \No active WhatsApp Web listener\ regardless of channel state.

Environment

  • OS: Windows 10 (10.0.26200)
  • Node: v24.13.0
  • OpenClaw channel: whatsapp (default account)

Workaround

Using WhatsApp Web in the browser as a fallback for outbound sends.

extent analysis

Fix Plan

The fix involves updating the WhatsApp Web listener configuration to ensure it is properly activated when the channel is connected.

  • Check the WhatsApp Web listener configuration:
    • Verify that the whatsapp_web_listener is enabled in the OpenClaw configuration file.
    • Ensure that the whatsapp_web_listener is properly configured to use the correct account and channel.
  • Update the message tool to handle WhatsApp Web listener activation:
    • Modify the message tool to activate the WhatsApp Web listener before sending messages.
    • Use the following example code to activate the listener:
const openclaw = require('openclaw');

// Activate WhatsApp Web listener
openclaw.channels.activateListener('whatsapp', 'default')
  .then(() => {
    // Send message using the message tool
    openclaw.message({ action: 'send', target: '+44...', message: '...' });
  })
  .catch((error) => {
    console.error('Error activating WhatsApp Web listener:', error);
  });
  • Restart the OpenClaw gateway to apply the changes.

Verification

To verify that the fix worked, try sending a message using the message tool after activating the WhatsApp Web listener. If the message is sent successfully, the fix is working correctly.

Extra Tips

  • Ensure that the WhatsApp Web listener is properly configured and enabled in the OpenClaw configuration file.
  • If issues persist, try restarting the OpenClaw gateway and verifying that the WhatsApp channel is connected and receiving inbound messages normally.

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 - ✅(Solved) Fix message tool: 'No active WhatsApp Web listener' error despite channel showing connected [2 pull requests, 1 participants]