openclaw - 💡(How to fix) Fix [Bug]: WhatsApp media sends fail on old-style group JIDs — message tool bypassed on new-style JIDs [2 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#52167Fetched 2026-04-08 01:14:52
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×2labeled ×2

WhatsApp media sends via the message tool fail with No active WhatsApp Web listener (account: default) on old-style group JIDs (format [email protected]), while text auto-replies work fine on the same groups, and both text and media work perfectly on new-style group JIDs (format [email protected]).

The issue is reproducible across multiple old-style groups. New groups created recently work without any issue.

Error Message

Old-style group — FAILS (JID: [email protected]):

08:33:49 info web-auto-reply {"module":"web-auto-reply"} {"from":"[email protected]","to":"+XXXXXXXXXXXXX","body":"[WhatsApp ...] @bot send audio with voice X..."} inbound web message 08:33:52 error [tools] message failed: Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default. 08:33:55 info web-auto-reply {"to":"[email protected]","text":"Technical issue: WhatsApp gateway not active...","mediaUrl":null} auto-reply sent (text)

New-style group — WORKS (JID: [email protected]):

08:34:47 info web-auto-reply {"module":"web-auto-reply"} {"from":"[email protected]","to":"+XXXXXXXXXXXXX","body":"@bot send audio with voice X..."} inbound web message 08:35:06 info web-auto-reply {"to":"[email protected]","text":null,"mediaUrl":"/home/user/.openclaw/workspace/test-audio.ogg","mediaSizeBytes":3523,"mediaKind":"audio"} auto-reply sent (media)

Key difference: old-style group goes through [tools] message path → fails. New-style group goes through auto-reply sent (media) path → succeeds.

Root Cause

WhatsApp media sends via the message tool fail with No active WhatsApp Web listener (account: default) on old-style group JIDs (format [email protected]), while text auto-replies work fine on the same groups, and both text and media work perfectly on new-style group JIDs (format [email protected]).

The issue is reproducible across multiple old-style groups. New groups created recently work without any issue.

Code Example

**Old-style group — FAILS (JID: `[email protected]`):**


08:33:49 info web-auto-reply {"module":"web-auto-reply"} {"from":"[email protected]","to":"+XXXXXXXXXXXXX","body":"[WhatsApp ...] @bot send audio with voice X..."} inbound web message
08:33:52 error [tools] message failed: Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default.
08:33:55 info web-auto-reply {"to":"[email protected]","text":"Technical issue: WhatsApp gateway not active...","mediaUrl":null} auto-reply sent (text)


**New-style group — WORKS (JID: `[email protected]`):**


08:34:47 info web-auto-reply {"module":"web-auto-reply"} {"from":"[email protected]","to":"+XXXXXXXXXXXXX","body":"@bot send audio with voice X..."} inbound web message
08:35:06 info web-auto-reply {"to":"[email protected]","text":null,"mediaUrl":"/home/user/.openclaw/workspace/test-audio.ogg","mediaSizeBytes":3523,"mediaKind":"audio"} auto-reply sent (media)


Key difference: old-style group goes through `[tools] message` path → fails. New-style group goes through `auto-reply sent (media)` path → succeeds.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

WhatsApp media sends via the message tool fail with No active WhatsApp Web listener (account: default) on old-style group JIDs (format [email protected]), while text auto-replies work fine on the same groups, and both text and media work perfectly on new-style group JIDs (format [email protected]).

The issue is reproducible across multiple old-style groups. New groups created recently work without any issue.

Steps to reproduce

  1. Have both an old WhatsApp group (JID format [email protected]) and a new group (JID format [email protected]) configured
  2. Send identical media requests (e.g. audio file) to both groups via agent mention
  3. Observe: new group receives media, old group gets No active WhatsApp Web listener error and falls back to text

Expected behavior

Media should be sent to all groups regardless of JID format.

Actual behavior

  • Old-style JID group: [tools] message failed: Error: No active WhatsApp Web listener (account: default) → agent sends text fallback apology
  • New-style JID group: media sent successfully via auto-reply sent (media)

OpenClaw version

2026.3.13 (61d171a)

Operating system

Raspberry Pi 5, Raspberry Pi OS

Install method

npm install -g openclaw`

Model

kimi-k2.5-cloud

Provider / routing chain

openclaw -> ollama -> kimi-k2.5-cloud

Additional provider/model setup details

N/A — this bug is in the WhatsApp channel layer (message tool -> listener Map lookup), not in the model/provider path. The same model successfully sends media to new-style JID groups.

Logs, screenshots, and evidence

**Old-style group — FAILS (JID: `[email protected]`):**


08:33:49 info web-auto-reply {"module":"web-auto-reply"} {"from":"[email protected]","to":"+XXXXXXXXXXXXX","body":"[WhatsApp ...] @bot send audio with voice X..."} inbound web message
08:33:52 error [tools] message failed: Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default.
08:33:55 info web-auto-reply {"to":"[email protected]","text":"Technical issue: WhatsApp gateway not active...","mediaUrl":null} auto-reply sent (text)


**New-style group — WORKS (JID: `[email protected]`):**


08:34:47 info web-auto-reply {"module":"web-auto-reply"} {"from":"[email protected]","to":"+XXXXXXXXXXXXX","body":"@bot send audio with voice X..."} inbound web message
08:35:06 info web-auto-reply {"to":"[email protected]","text":null,"mediaUrl":"/home/user/.openclaw/workspace/test-audio.ogg","mediaSizeBytes":3523,"mediaKind":"audio"} auto-reply sent (media)


Key difference: old-style group goes through `[tools] message` path → fails. New-style group goes through `auto-reply sent (media)` path → succeeds.

Impact and severity

Affected: WhatsApp group users with old-style JIDs (pre-2024 groups) Severity: Medium (blocks media sends, text still works) Frequency: 100% reproducible on all old-style JID groups Consequence: Agent cannot send media (audio, images) to old WhatsApp groups, only text fallback

Additional information

  • Full RPi5 reboot — no change
  • openclaw channels logout + channels login (full WhatsApp re-link) — no change
  • Deleted sessions.json to clear all sessions — no change
  • Gateway stop/start — no change
  • Confirmed gateway is running and connected (text replies work on all groups)
  • Reproducible across multiple old-style groups, all new-style groups work fine

Related issues

  • #26484 — Old-style group JIDs silently dropped by web-auto-reply pipeline
  • #14406 — Duplicate listener Maps across bundled chunks
  • #33880 — WhatsApp group chat messages not spawning agent sessions (regression)

extent analysis

Fix Plan

To resolve the issue of WhatsApp media sends failing with No active WhatsApp Web listener on old-style group JIDs, we need to update the listener Map lookup in the WhatsApp channel layer.

Here are the steps:

  • Update the listenerMap.js file to handle old-style JID formats.
  • Add a function to normalize JIDs to the new format before lookup.
  • Implement a fallback to handle cases where the JID is not found in the listener Map.

Example code snippet:

// listenerMap.js
function normalizeJid(jid) {
  // Remove hyphen and prefix with 120363 if necessary
  if (jid.includes('-')) {
    return '120363' + jid.replace('-', '');
  }
  return jid;
}

function getListener(jid) {
  const normalizedJid = normalizeJid(jid);
  // Perform lookup in listener Map using normalized JID
  return listenerMap.get(normalizedJid);
}
  • Update the message tool to use the new getListener function.
// message.js
const listener = getListener(jid);
if (listener) {
  // Send media using the listener
} else {
  // Handle case where listener is not found
}

Verification

To verify the fix, send media to an old-style group JID and check if it is received successfully. Also, test with new-style group JIDs to ensure the fix does not break existing functionality.

Extra Tips

  • Make sure to update the listenerMap.js file and restart the gateway after applying the changes.
  • If issues persist, check the gateway logs for any errors related to the listener Map lookup.
  • Consider adding additional logging to help diagnose any future issues with the WhatsApp channel layer.

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

Media should be sent to all groups regardless of JID format.

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]: WhatsApp media sends fail on old-style group JIDs — message tool bypassed on new-style JIDs [2 comments, 2 participants]