openclaw - 💡(How to fix) Fix v2026.4.21: WhatsApp plugin fails to load — @whiskeysockets/baileys missing from distribution; watchdog reinstalls broken version without health-gate [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#70545Fetched 2026-04-24 05:56:41
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1subscribed ×1

Two related bugs that caused a complete WhatsApp outage on upgrade to v2026.4.21.

Error Message

[plugins] whatsapp failed during register from .../openclaw/dist/extensions/whatsapp/index.js: Error: Cannot find module '@whiskeysockets/baileys' Require stack:

  • .../openclaw/dist/extensions/whatsapp/auth-store-DY1p5mrF.js

Root Cause

Two related bugs that caused a complete WhatsApp outage on upgrade to v2026.4.21.

Fix Action

Fix / Workaround

Two related bugs that caused a complete WhatsApp outage on upgrade to v2026.4.21.

Code Example

[plugins] whatsapp failed during register from .../openclaw/dist/extensions/whatsapp/index.js:
Error: Cannot find module '@whiskeysockets/baileys'
Require stack:
- .../openclaw/dist/extensions/whatsapp/auth-store-DY1p5mrF.js

---

refresh failed: Cannot find module './channel.runtime-CDQh58UM.js'
Require stack:
- .../openclaw/dist/extensions/whatsapp/state-migrations-4tjOx7wh.js

---

npm install -g openclaw@2026.4.21
openclaw gateway restart
# WhatsApp plugin fails immediately
RAW_BUFFERClick to expand / collapse

Summary

Two related bugs that caused a complete WhatsApp outage on upgrade to v2026.4.21.

Bug 1 — Baileys missing from distribution

Version: 2026.4.21
Node: v24.13.1 (plist) / v25.6.1 (running)
Platform: macOS (Apple Silicon)

After upgrading to v2026.4.21, the WhatsApp plugin fails to load on every gateway start:

[plugins] whatsapp failed during register from .../openclaw/dist/extensions/whatsapp/index.js:
Error: Cannot find module '@whiskeysockets/baileys'
Require stack:
- .../openclaw/dist/extensions/whatsapp/auth-store-DY1p5mrF.js

Also accompanied by:

refresh failed: Cannot find module './channel.runtime-CDQh58UM.js'
Require stack:
- .../openclaw/dist/extensions/whatsapp/state-migrations-4tjOx7wh.js

The prior version (2026.4.15) worked correctly. The @whiskeysockets/baileys dependency appears to be missing from the npm distribution bundle for this release. Rolling back to 2026.4.15 restored normal operation.

Bug 2 — Watchdog reinstalls broken version without health-gate

The LaunchDaemon watchdog (ai.openclaw.gateway.watchdog) runs openclaw gateway install --force when it detects the gateway is down. When it ran after the broken upgrade, it:

  1. Reinstalled the same broken v2026.4.21 (latest on npm = still broken)
  2. Declared "reinstall succeeded" based on launchctl load success alone
  3. Never verified that WhatsApp (or any plugin) actually loaded correctly

Expected behaviour: After install --force, the watchdog should run a plugin health check (e.g. verify WhatsApp channel is registered) and roll back to a known-good backup if the check fails.

Actual behaviour: Watchdog reinstalls → declares success → gateway restarts into broken state on loop.

Impact

  • WhatsApp was completely dark from 03:17–08:00 BST
  • No automated alert fired (primary alert channel was the broken channel)
  • Required manual user intervention to fix

Suggested Fixes

  1. Ensure @whiskeysockets/baileys is bundled correctly in the v2026.4.21 npm distribution
  2. Add a post-install health check to the watchdog before declaring success — at minimum, verify that whatsapp plugin registers without error
  3. If health check fails, roll back to the .bak plist backup and alert via a secondary channel (Telegram, Discord, etc.)

Repro

npm install -g [email protected]
openclaw gateway restart
# WhatsApp plugin fails immediately

extent analysis

TL;DR

The most likely fix involves ensuring the @whiskeysockets/baileys dependency is correctly bundled in the npm distribution for version 2026.4.21 and implementing a post-install health check in the watchdog.

Guidance

  • Verify that the @whiskeysockets/baileys package is included in the dependencies of the openclaw package in the package.json file.
  • Implement a health check in the watchdog script to verify that the WhatsApp plugin loads correctly after installation, before declaring the installation a success.
  • Consider adding a rollback mechanism to the watchdog in case the health check fails, to revert to a known good version.
  • Test the installation and health check process using the provided repro steps to ensure the fix is effective.

Example

No code example is provided as the issue does not require a specific code snippet to understand the solution.

Notes

The provided solution assumes that the issue is indeed caused by the missing @whiskeysockets/baileys dependency and the lack of a health check in the watchdog. If other issues are present, additional debugging may be required.

Recommendation

Apply the suggested fixes, specifically ensuring the @whiskeysockets/baileys dependency is correctly bundled and implementing a post-install health check in the watchdog, as these directly address the identified causes of the outage.

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