openclaw - ✅(Solved) Fix WhatsApp inbound messages not received in k3s nested container (outbound works) [1 pull requests, 2 comments, 3 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#51049Fetched 2026-04-08 01:05:00
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Timeline (top)
commented ×2cross-referenced ×1mentioned ×1subscribed ×1

WhatsApp inbound messages are never received by the gateway when running inside a k3s cluster nested in a Docker container (openshell-cluster setup). Outbound messages work perfectly.

Root Cause

WhatsApp inbound messages are never received by the gateway when running inside a k3s cluster nested in a Docker container (openshell-cluster setup). Outbound messages work perfectly.

PR fix notes

PR #54959: docs: add OpenShell deployment guide

Description (problem / solution / changelog)

Summary

Add a comprehensive deployment guide for running OpenClaw inside NVIDIA OpenShell sandboxes.

The guide covers:

  • Prerequisites and quick start with the automated setup script
  • Manual step-by-step setup — Docker, gateway, sandbox creation, CoreDNS fix, OpenClaw bundling, Slack configuration
  • Network policy — policy structure, the Slack REST/WebSocket split, why *.slack.com wildcards break Socket Mode on v0.0.15+, tls: skip for WebSocket raw TCP passthrough
  • WebSocket proxy patch — why the ws library doesn't honor HTTPS_PROXY, the Module._load monkey-patch solution, applicability to Discord gateway connections
  • Troubleshooting — DNS failures, WebSocket issues, bot ignoring DMs, npm hangs, gateway corruption
  • Known limitations — web_fetch/web_search proxy issues, binary identification requirements

Also adds the new page to the Platforms tab in docs.json navigation.

Related issues

This addresses the documentation gap for sandboxed/proxied deployments. Related issues reporting proxy, WebSocket, and DNS failures in sandboxed environments:

  • #49948 — web_fetch proxy issues
  • #47598 — WebSocket connection failures
  • #46306 — web_search proxy errors
  • #50655 — DNS resolution failures in sandboxed environments
  • #44980 — proxy configuration issues
  • #51049 — sandbox networking problems

Changed files

  • docs/.i18n/glossary.zh-CN.json (modified, +28/-0)
  • docs/docs.json (modified, +2/-1)
  • docs/platforms/openshell.md (added, +836/-0)

Code Example

{
  "web": { "enabled": true },
  "channels": {
    "whatsapp": {
      "enabled": true,
      "dmPolicy": "open",
      "allowFrom": ["*"],
      "accounts": {
        "default": {
          "enabled": true,
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Description

WhatsApp inbound messages are never received by the gateway when running inside a k3s cluster nested in a Docker container (openshell-cluster setup). Outbound messages work perfectly.

Environment

  • OpenClaw: v2026.3.13 (61d171a)
  • Node.js: 22.22.1
  • OS: Ubuntu 22.04 (inside k3s pod, inside Docker container)
  • Container setup: Docker → k3s (k3s v1.35.2+k3s1) → OpenShell pod (nemoclaw)
  • WhatsApp plugin: @openclaw/whatsapp with Baileys
  • Network: Container can reach web.whatsapp.com over TLS (verified)

Steps to Reproduce

  1. Run OpenClaw inside an OpenShell k3s cluster (Docker-in-Docker setup)
  2. Configure WhatsApp channel (channels.whatsapp.accounts.default.enabled: true)
  3. Link WhatsApp via openclaw channels login --channel whatsapp
  4. Start gateway: openclaw gateway
  5. Send outbound message: openclaw message send --channel whatsapp --target "<number>" --message "test"works
  6. Send inbound message from another WhatsApp number to the linked number → never received

Observed Behavior

  • Gateway logs show: [whatsapp] Listening for personal WhatsApp inbound messages.
  • openclaw health --json shows: running: false, connected: false, lastMessageAt: null
  • Outbound messages send successfully with message IDs
  • No inbound messages ever appear in gateway logs or detailed log file
  • No errors logged by Baileys

Expected Behavior

Inbound WhatsApp messages should appear in gateway logs and be processed by the agent.

Configuration

{
  "web": { "enabled": true },
  "channels": {
    "whatsapp": {
      "enabled": true,
      "dmPolicy": "open",
      "allowFrom": ["*"],
      "accounts": {
        "default": {
          "enabled": true,
          "dmPolicy": "open",
          "allowFrom": ["*"]
        }
      }
    }
  }
}

What I've Tried

  • Fresh QR link (multiple times)
  • Updated from v2026.3.11 to v2026.3.13
  • Set dmPolicy to "open" with allowFrom ["*"]
  • Ran openclaw doctor --fix
  • Verified network connectivity to web.whatsapp.com
  • Confirmed WhatsApp shows as LINKED and OK in openclaw status --deep
  • Ran gateway both interactively and in background

Related Issues (all closed)

  • #19856 — WhatsApp inbound messages lost after reconnect
  • #784 — WhatsApp messages from other numbers silently dropped
  • #1952 — WhatsApp group inbound stops after gateway restart
  • #19509 — WhatsApp Group Messages Not Received in 2026.2.15

These fixes are in v2026.3.13 but the problem persists in the nested k3s container environment.

extent analysis

Fix Plan

The issue seems to be related to the Docker-in-Docker setup and potential networking or WebSocket connection issues. To fix this, we'll try the following steps:

  • Expose the WhatsApp WebSocket port: Ensure that the WhatsApp WebSocket port is exposed and accessible from outside the container.
  • Update the WhatsApp plugin configuration: Configure the WhatsApp plugin to use the correct WebSocket URL and port.
  • Verify WebSocket connection: Check the WebSocket connection logs to ensure that the connection is established successfully.

Step-by-Step Solution

  1. Expose the WhatsApp WebSocket port: Update the docker-compose.yml file to expose the WhatsApp WebSocket port (e.g., 8080):
    version: '3'
    services:
      openshell-cluster:
        ...
        ports:
          - "8080:8080"
  2. Update the WhatsApp plugin configuration: Update the config.json file to use the correct WebSocket URL and port:
    {
      "web": { "enabled": true },
      "channels": {
        "whatsapp": {
          "enabled": true,
          "dmPolicy": "open",
          "allowFrom": ["*"],
          "accounts": {
            "default": {
              "enabled": true,
              "dmPolicy": "open",
              "allowFrom": ["*"],
              "websocketUrl": "ws://localhost:8080"
            }
          }
        }
      }
    }
  3. Verify WebSocket connection: Check the gateway logs for WebSocket connection establishment:
    [whatsapp] WebSocket connection established

Verification

To verify that the fix worked, send an inbound message from another WhatsApp number to the linked number and check the gateway logs for the received message:

[whatsapp] Received inbound message from <number>: <message>

If the message is received, the fix is successful. Otherwise, check the WebSocket connection logs for any errors or issues.

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