openclaw - 💡(How to fix) Fix WhatsApp: PDF/document media sends silently deliver text-only (v2026.4.5) [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#61846Fetched 2026-04-08 02:53:39
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

On v2026.4.5 (Windows), sending documents (PDFs) via WhatsApp delivers only the text caption -- the document attachment is missing. The gateway reports success with a valid messageId but the recipient only receives text.

Error Message

Only caption text arrives. No error in gateway output.

Root Cause

On v2026.4.5 (Windows), sending documents (PDFs) via WhatsApp delivers only the text caption -- the document attachment is missing. The gateway reports success with a valid messageId but the recipient only receives text.

RAW_BUFFERClick to expand / collapse

Description

On v2026.4.5 (Windows), sending documents (PDFs) via WhatsApp delivers only the text caption -- the document attachment is missing. The gateway reports success with a valid messageId but the recipient only receives text.

Steps to reproduce

  1. Use the \message\ tool to send a PDF: \message send --channel whatsapp --target +number --message 'test' --media /path/to/file.pdf\
  2. Gateway returns success with messageId and mediaUrl populated
  3. Recipient receives only the text caption, no PDF attachment

Environment

  • OpenClaw: 2026.4.5 (3e72c03)
  • OS: Windows 10 (x64)
  • Node: v22.22.0
  • Baileys: 7.0.0-rc.9
  • WhatsApp plugin: bundled

Investigation

  • \detectMime\ correctly returns \pplication/pdf\
  • \kindFromMime\ correctly returns \document\
  • \createWebSendApi.sendMessage\ constructs correct Baileys payload: { document: buffer, fileName, caption, mimetype }\
  • Text-only sends work fine
  • Image sends also appear to fail (not just PDFs)
  • Gateway logs show 'Image resized to fit limits' even when sending PDFs, suggesting media pipeline intercepts incorrectly
  • Suspicion: the new media security hardening in 4.5 (UNC/network path blocking, localRoots strictness) may be silently dropping media payloads

Expected

PDF attachment should arrive on WhatsApp alongside the caption text.

Actual

Only caption text arrives. No error in gateway output.

extent analysis

TL;DR

The issue may be resolved by adjusting the media security hardening settings in the gateway configuration to properly handle document attachments.

Guidance

  • Review the media security hardening settings introduced in v2026.4.5, specifically the UNC/network path blocking and localRoots strictness, to ensure they are not interfering with document attachments.
  • Verify that the media pipeline is correctly handling document attachments by checking the gateway logs for any errors or warnings related to media processing.
  • Test sending image attachments to see if the issue is specific to PDFs or affects all document types.
  • Investigate the createWebSendApi.sendMessage payload construction to ensure that the document buffer and metadata are correctly formatted for WhatsApp.

Example

No specific code snippet is provided as the issue seems to be related to configuration and media pipeline processing rather than code syntax.

Notes

The issue may be specific to the Windows environment and the version of OpenClaw and Baileys being used. Further investigation is needed to determine the root cause and to find a solution that works for all environments and versions.

Recommendation

Apply a workaround by adjusting the media security hardening settings to allow document attachments to be sent correctly, as the root cause seems to be related to these settings.

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