openclaw - 💡(How to fix) Fix WhatsApp plugin depends on RC library and requires postinstall hotfix — unstable on clean install [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#68778Fetched 2026-04-19 15:07:41
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

Error Message

  1. If postinstall hotfix fails, emit a clear error rather than warn-and-continue

Root Cause

Three compounding risks found in source code:

  1. RC dependency: extensions/whatsapp/package.json depends on @whiskeysockets/baileys: 7.0.0-rc.9

    • RC versions are inherently unstable; APIs can change without notice
    • Upstream baileys updates can break OpenClaw integration
  2. Postinstall hotfix required: scripts/postinstall-bundled-plugins.mjs:467-602 contains applyBaileysEncryptedStreamFinishHotfix()

    • Patches known issues in baileys encrypted stream and fetch dispatcher
    • If postinstall is skipped (npm install --ignore-scripts), fails due to permissions, or encounters network issues, WhatsApp is completely broken
  3. Optional bundled cluster: scripts/lib/optional-bundled-clusters.mjs:13 lists WhatsApp as an optional cluster

    • Controlled by the OPENCLAW_INCLUDE_OPTIONAL_BUNDLED environment variable
    • Some CI build environments may not set this variable

Fix Action

Fix / Workaround

  1. Postinstall hotfix required: scripts/postinstall-bundled-plugins.mjs:467-602 contains applyBaileysEncryptedStreamFinishHotfix()

    • Patches known issues in baileys encrypted stream and fetch dispatcher
    • If postinstall is skipped (npm install --ignore-scripts), fails due to permissions, or encounters network issues, WhatsApp is completely broken
  2. Upgrade baileys from RC to a stable release, or pin to a specific commit/hash in package.json

  3. Move the hotfix logic from postinstall to plugin load time (dynamic patching), reducing the blast radius of install-time failures

  4. Add a WhatsApp plugin health check to openclaw doctor

  5. If postinstall hotfix fails, emit a clear error rather than warn-and-continue

RAW_BUFFERClick to expand / collapse

Problem

After upgrading or clean installing, the WhatsApp channel is unavailable. openclaw plugins list shows the WhatsApp plugin as broken or not loaded.

Root Cause Analysis

Three compounding risks found in source code:

  1. RC dependency: extensions/whatsapp/package.json depends on @whiskeysockets/baileys: 7.0.0-rc.9

    • RC versions are inherently unstable; APIs can change without notice
    • Upstream baileys updates can break OpenClaw integration
  2. Postinstall hotfix required: scripts/postinstall-bundled-plugins.mjs:467-602 contains applyBaileysEncryptedStreamFinishHotfix()

    • Patches known issues in baileys encrypted stream and fetch dispatcher
    • If postinstall is skipped (npm install --ignore-scripts), fails due to permissions, or encounters network issues, WhatsApp is completely broken
  3. Optional bundled cluster: scripts/lib/optional-bundled-clusters.mjs:13 lists WhatsApp as an optional cluster

    • Controlled by the OPENCLAW_INCLUDE_OPTIONAL_BUNDLED environment variable
    • Some CI build environments may not set this variable

Suggested Fixes

  1. Upgrade baileys from RC to a stable release, or pin to a specific commit/hash in package.json
  2. Move the hotfix logic from postinstall to plugin load time (dynamic patching), reducing the blast radius of install-time failures
  3. Add a WhatsApp plugin health check to openclaw doctor
  4. If postinstall hotfix fails, emit a clear error rather than warn-and-continue

Related Files

  • extensions/whatsapp/package.json
  • scripts/postinstall-bundled-plugins.mjs
  • scripts/lib/optional-bundled-clusters.mjs

extent analysis

TL;DR

Upgrading baileys from RC to a stable release or pinning to a specific commit/hash in package.json may resolve the WhatsApp channel unavailability issue.

Guidance

  • Verify the OPENCLAW_INCLUDE_OPTIONAL_BUNDLED environment variable is set in the CI build environment to ensure the WhatsApp plugin is included.
  • Check the package.json file in extensions/whatsapp to confirm the baileys version and consider upgrading or pinning to a stable release.
  • Review the postinstall-bundled-plugins.mjs script to ensure the hotfix is applied successfully, and consider moving the hotfix logic to plugin load time for more robustness.
  • Run openclaw doctor and check for any errors or warnings related to the WhatsApp plugin to identify potential issues.

Example

No code snippet is provided as it is not clearly supported by the issue, but an example of pinning a specific version in package.json could be:

"dependencies": {
  "@whiskeysockets/baileys": "7.0.0"
}

Notes

The issue is specific to the WhatsApp channel and the baileys library, so the suggested fixes may not apply to other channels or plugins. Additionally, the effectiveness of the suggested fixes depends on the specific environment and configuration.

Recommendation

Apply workaround: Upgrade baileys to a stable release or pin to a specific commit/hash, as this addresses the identified root cause of the issue and reduces the risk of future breakages.

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

openclaw - 💡(How to fix) Fix WhatsApp plugin depends on RC library and requires postinstall hotfix — unstable on clean install [1 comments, 2 participants]