openclaw - 💡(How to fix) Fix [Bug]: Proactive `message send` fails with "No active WhatsApp Web listener" while auto-reply works [2 comments, 3 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#48938Fetched 2026-04-08 00:50:48
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
commented ×2labeled ×2closed ×1locked ×1

Bug: Proactive message send fails with "No active WhatsApp Web listener" while auto-reply works*

Version: 2026.3.13 (61d171a) Platform: Docker, Node 22.22.1, Linux 5.15.0-139-generic x64 Channel: WhatsApp (selfChatMode: true)

Description: The message tool's proactive send (used by cron delivery and agent-initiated sends) fails with Error: No active WhatsApp Web listener (account: default) even when WhatsApp is fully connected and auto-replies work fine.

Root cause (from source inspection): setActiveWebListener() in channel-web-BZO9MGfW.js imports from reply-Bm8VrLQh.js, which populates a listeners Map in that module. However, requireActiveWebListener() called by the RPC send path resolves to a different listeners Map in a separate bundle (auth-profiles-DRjqKE3G.js line 162806 vs model-selection-CU2b7bN6.js line 165134). These are two separate new Map() instances due to module duplication in the build output.

To reproduce:

  1. Configure WhatsApp with selfChatMode: true
  2. Send a message to the bot → auto-reply works ✅
  3. Use message send tool or cron delivery → fails with "No active WhatsApp Web listener" ❌

Evidence:

  • channels.status reports connected: true, linked: true, running: true
  • deliverWebReply (auto-reply path) → works, uses msg.reply() on the Baileys socket directly
  • requireActiveWebListener (RPC send path) → fails, checks empty Map

Workaround: None found. Proactive sends are completely broken.

Error Message

The message tool's proactive send (used by cron delivery and agent-initiated sends) fails with Error: No active WhatsApp Web listener (account: default) even when WhatsApp is fully connected and auto-replies work fine. The message tool's proactive send (used by cron delivery and agent-initiated sends) fails with Error: No active WhatsApp Web listener (account: default) even when WhatsApp is fully connected and auto-replies work fine.

Root Cause

Root cause (from source inspection): setActiveWebListener() in channel-web-BZO9MGfW.js imports from reply-Bm8VrLQh.js, which populates a listeners Map in that module. However, requireActiveWebListener() called by the RPC send path resolves to a different listeners Map in a separate bundle (auth-profiles-DRjqKE3G.js line 162806 vs model-selection-CU2b7bN6.js line 165134). These are two separate new Map() instances due to module duplication in the build output.

Fix Action

Fix / Workaround

Workaround: None found. Proactive sends are completely broken.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

Bug: Proactive message send fails with "No active WhatsApp Web listener" while auto-reply works*

Version: 2026.3.13 (61d171a) Platform: Docker, Node 22.22.1, Linux 5.15.0-139-generic x64 Channel: WhatsApp (selfChatMode: true)

Description: The message tool's proactive send (used by cron delivery and agent-initiated sends) fails with Error: No active WhatsApp Web listener (account: default) even when WhatsApp is fully connected and auto-replies work fine.

Root cause (from source inspection): setActiveWebListener() in channel-web-BZO9MGfW.js imports from reply-Bm8VrLQh.js, which populates a listeners Map in that module. However, requireActiveWebListener() called by the RPC send path resolves to a different listeners Map in a separate bundle (auth-profiles-DRjqKE3G.js line 162806 vs model-selection-CU2b7bN6.js line 165134). These are two separate new Map() instances due to module duplication in the build output.

To reproduce:

  1. Configure WhatsApp with selfChatMode: true
  2. Send a message to the bot → auto-reply works ✅
  3. Use message send tool or cron delivery → fails with "No active WhatsApp Web listener" ❌

Evidence:

  • channels.status reports connected: true, linked: true, running: true
  • deliverWebReply (auto-reply path) → works, uses msg.reply() on the Baileys socket directly
  • requireActiveWebListener (RPC send path) → fails, checks empty Map

Workaround: None found. Proactive sends are completely broken.

Steps to reproduce

To reproduce:

  1. Configure WhatsApp with selfChatMode: true
  2. Send a message to the bot → auto-reply works ✅
  3. Use message send tool or cron delivery → fails with "No active WhatsApp Web listener" ❌

Expected behavior

Expecting OpenClaw to be able to send me messages

Actual behavior

Description: The message tool's proactive send (used by cron delivery and agent-initiated sends) fails with Error: No active WhatsApp Web listener (account: default) even when WhatsApp is fully connected and auto-replies work fine.

OpenClaw version

2026.3.13 (61d171a)

Operating system

Docker, Node 22.22.1, Linux 5.15.0-139-generic x64

Install method

Docker npm

Model

Claude Opus 4.6

Provider / routing chain

OpenClaw to WhatsApp

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To fix the issue, we need to ensure that the listeners Map is shared between the channel-web-BZO9MGfW.js and auth-profiles-DRjqKE3G.js modules. We can achieve this by creating a separate module that exports the listeners Map and importing it in both modules.

Step-by-Step Solution

  • Create a new file web-listeners.js with the following content:
const listeners = new Map();
module.exports = listeners;
  • In channel-web-BZO9MGfW.js, replace the listeners Map with an import from web-listeners.js:
const listeners = require('./web-listeners.js');
  • In auth-profiles-DRjqKE3G.js, replace the listeners Map with an import from web-listeners.js:
const listeners = require('./web-listeners.js');
  • Update the setActiveWebListener() function in channel-web-BZO9MGfW.js to use the shared listeners Map:
function setActiveWebListener(account, listener) {
  listeners.set(account, listener);
}
  • Update the requireActiveWebListener() function in auth-profiles-DRjqKE3G.js to use the shared listeners Map:
function requireActiveWebListener(account) {
  return listeners.get(account);
}

Verification

To verify that the fix worked, follow these steps:

  • Restart the Docker container
  • Send a message to the bot → auto-reply should work
  • Use the message send tool or cron delivery → proactive send should work without errors

Extra Tips

  • Make sure to update the web-listeners.js file to export the listeners Map correctly
  • If you're using a bundler like Webpack, ensure that the web-listeners.js file is not duplicated in the build output
  • Test the fix thoroughly to ensure that both auto-replies and proactive sends work as expected

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…

FAQ

Expected behavior

Expecting OpenClaw to be able to send me messages

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 [Bug]: Proactive `message send` fails with "No active WhatsApp Web listener" while auto-reply works [2 comments, 3 participants]