openclaw - 💡(How to fix) Fix [Bug]: WhatsApp media send fails silently in v2026.4.8 — `hasMedia: false` despite `--media` flag (related to #23140, #54131) [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#63314Fetched 2026-04-09 07:55:23
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Author
Participants
Timeline (top)
commented ×1

WhatsApp outbound media sending fails silently in OpenClaw v2026.4.8. The openclaw message send --media command reports success with a Message ID, but the media is never attached — logs show hasMedia: false. This is the same root cause as #23140, but persists in the latest version.

Error Message

Full gateway log excerpt:

[20:45:27] {"subsystem":"gateway/channels/whatsapp/outbound"} "Sending message -> sha256:4d0ad56c203a"
[20:45:27] {"module":"web-outbound"} {"jid":"sha256:4d0ad56c203a","hasMedia":false} "sending message"
[20:45:28] {"subsystem":"gateway/channels/whatsapp/outbound"} "Sent message 3EB07F76A07A7989B2C9CF -> sha256:4d0ad56c203a (804ms)"

Thanks for the amazing tool! 🦞

Root Cause

WhatsApp outbound media sending fails silently in OpenClaw v2026.4.8. The openclaw message send --media command reports success with a Message ID, but the media is never attached — logs show hasMedia: false. This is the same root cause as #23140, but persists in the latest version.

Fix Action

Fix / Workaround

  1. Issue #23140 identified that extensions/whatsapp/src/channel.ts does not forward mediaLocalRoots to sendMessageWhatsApp
  2. Issue #54131 reported MEDIA: token fails silently, workaround was openclaw message send --media
  3. Current status (v2026.4.8): Both MEDIA: token AND --media CLI flag fail
  • Severity: High — WhatsApp media sending completely broken

  • Impact: All WhatsApp outbound media (images, videos, documents, voice notes) fail silently

  • Workaround: None currently (manual WhatsApp Web upload required)

  • #23140 — LocalMediaAccessError when sending media via WhatsApp extension plugin

  • #54131 — MEDIA: token fails silently, workaround was CLI --media flag

Code Example

openclaw message send --channel whatsapp --target "+6282136585608" --media "/home/sutopo/.openclaw/media/test_red.png" --message "Test media"

---

Sent via gateway (whatsapp). Message ID: 3EB07F76A07A7989B2C9CF

---

{"module":"web-outbound","to":"sha256:cbf013b4d4dd"}
  {"jid":"sha256:4d0ad56c203a","hasMedia":false},
  "sending message"

{"subsystem":"gateway/channels/whatsapp/outbound"}
  "Sent message 3EB07F76A07A7989B2C9CF -> sha256:4d0ad56c203a (804ms)"

---

[20:45:27] {"subsystem":"gateway/channels/whatsapp/outbound"} "Sending message -> sha256:4d0ad56c203a"
[20:45:27] {"module":"web-outbound"} {"jid":"sha256:4d0ad56c203a","hasMedia":false} "sending message"
[20:45:28] {"subsystem":"gateway/channels/whatsapp/outbound"} "Sent message 3EB07F76A07A7989B2C9CF -> sha256:4d0ad56c203a (804ms)"
RAW_BUFFERClick to expand / collapse

Summary

WhatsApp outbound media sending fails silently in OpenClaw v2026.4.8. The openclaw message send --media command reports success with a Message ID, but the media is never attached — logs show hasMedia: false. This is the same root cause as #23140, but persists in the latest version.

Environment

  • OpenClaw: 2026.4.8 (9ece252)
  • OS: Ubuntu 24.04 LTS (x64)
  • Gateway mode: systemd service (user daemon)
  • Channel: WhatsApp Web (Baileys)
  • Node.js: v24.14.1

Steps to Reproduce

  1. Install latest OpenClaw: npm install -g openclaw@latest
  2. Place a media file in ~/.openclaw/media/ (e.g., test_red.png)
  3. Send via CLI:
    openclaw message send --channel whatsapp --target "+6282136585608" --media "/home/sutopo/.openclaw/media/test_red.png" --message "Test media"
  4. Check WhatsApp — no media received
  5. Check gateway logs — shows hasMedia: false

Actual Behavior

CLI output:

✅ Sent via gateway (whatsapp). Message ID: 3EB07F76A07A7989B2C9CF

Gateway log (/tmp/openclaw/openclaw-2026-04-08.log):

{"module":"web-outbound","to":"sha256:cbf013b4d4dd"}
  {"jid":"sha256:4d0ad56c203a","hasMedia":false},
  "sending message"

{"subsystem":"gateway/channels/whatsapp/outbound"}
  "Sent message 3EB07F76A07A7989B2C9CF -> sha256:4d0ad56c203a (804ms)"

Key finding: hasMedia: false despite --media flag being passed.

Expected Behavior

Media file should be attached and sent to WhatsApp recipient. Log should show:

  • hasMedia: true
  • mediaUrl populated with file path
  • mediaKind (image/video/document)

Investigation

This is the same root cause as #23140:

  1. Issue #23140 identified that extensions/whatsapp/src/channel.ts does not forward mediaLocalRoots to sendMessageWhatsApp
  2. Issue #54131 reported MEDIA: token fails silently, workaround was openclaw message send --media
  3. Current status (v2026.4.8): Both MEDIA: token AND --media CLI flag fail

The bug appears to be in the WhatsApp extension plugin's outbound send path:

  • mediaLocalRoots not passed to loadWebMedia
  • assertLocalMediaAllowed receives undefined for allowed roots
  • Media validation fails silently, hasMedia set to false
  • Message sent as text-only

What I Tested

TestResult
openclaw message send --media (CLI)hasMedia: false
MEDIA: token in agent reply❌ Not tested (agent session reset)
Small file (287 bytes PNG)❌ Same issue
Large file (6 MB MP4)❌ Same issue
Telegram media send✅ Works correctly

Impact and Severity

  • Severity: High — WhatsApp media sending completely broken
  • Impact: All WhatsApp outbound media (images, videos, documents, voice notes) fail silently
  • Workaround: None currently (manual WhatsApp Web upload required)

Related Issues

  • #23140 — LocalMediaAccessError when sending media via WhatsApp extension plugin
  • #54131 — MEDIA: token fails silently, workaround was CLI --media flag

Suggested Fix

  1. Verify extensions/whatsapp/src/channel.ts forwards mediaLocalRoots to sendMessageWhatsApp
  2. Add error logging when media validation fails (currently silent)
  3. Add integration test for WhatsApp media send in CI

Logs

Full gateway log excerpt:

[20:45:27] {"subsystem":"gateway/channels/whatsapp/outbound"} "Sending message -> sha256:4d0ad56c203a"
[20:45:27] {"module":"web-outbound"} {"jid":"sha256:4d0ad56c203a","hasMedia":false} "sending message"
[20:45:28] {"subsystem":"gateway/channels/whatsapp/outbound"} "Sent message 3EB07F76A07A7989B2C9CF -> sha256:4d0ad56c203a (804ms)"

Thanks for the amazing tool! 🦞

extent analysis

TL;DR

The most likely fix for the WhatsApp outbound media sending issue in OpenClaw v2026.4.8 is to modify the extensions/whatsapp/src/channel.ts file to forward mediaLocalRoots to sendMessageWhatsApp and add error logging for media validation failures.

Guidance

  1. Verify code: Check extensions/whatsapp/src/channel.ts to ensure mediaLocalRoots is passed to sendMessageWhatsApp.
  2. Add error logging: Modify the media validation code to log errors when validation fails, rather than silently setting hasMedia to false.
  3. Test media sending: After applying the fix, test WhatsApp media sending using the openclaw message send --media command to verify that media is attached and sent correctly.
  4. Check logs: Verify that the gateway logs show hasMedia: true and a populated mediaUrl after applying the fix.

Example

// extensions/whatsapp/src/channel.ts
// ...
sendMessageWhatsApp({
  // ...
  mediaLocalRoots: mediaLocalRoots, // Ensure mediaLocalRoots is passed
  // ...
});
// ...

Notes

The provided fix is based on the investigation and suggested fix in the issue description. However, without the exact code changes, it's difficult to provide a complete solution. The suggested fix should be verified and tested thoroughly to ensure it resolves the issue.

Recommendation

Apply the workaround by modifying the extensions/whatsapp/src/channel.ts file to forward mediaLocalRoots to sendMessageWhatsApp and add error logging for media validation failures, as this is the most likely cause of the issue.

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