#wacli send fails with "context deadline exceeded" - AUTHENTICATED but not CONNECTED

1 messages Ā· Page 1 of 1 (latest)

opaque holly
#

Environment:

• wacli version: latest (installed via brew)
• macOS on Mac mini (arm64)
• Store: ~/.wacli
Issue:
After successful QR authentication, wacli doctor shows:

AUTHENTICATED true
CONNECTED false

When trying to send a message:

wacli send text --to "+32473456559" --message "test" --timeout 20s --json

Error:

{"success":false,"data":null,"error":"failed to get user info for +32473456559@s.whatsapp.net to fill LID cache: failed to send usync query: context deadline exceeded"}

What I tried:

• Fresh QR scan authentication (works, shows AUTHENTICATED=true)
• Running wacli sync first (doesn't output anything, hangs)
• Shorter timeouts (same error)
• Different phone numbers (same error)
• The recipient number IS on WhatsApp (verified on phone)
Observations:

• wacli chats list works (returns existing chats from initial sync)
• wacli messages search works
• Initial history sync (900 conversations) completed after auth
• But CONNECTED never becomes true
• Send commands timeout waiting for connection
Question:
Is there a way to force connection before sending? Or is there a known issue with the connection staying alive after auth?

dawn hawkBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> āœ… Mark Solution

untold frostBOT
# opaque holly Environment: • wacli version: latest (installed via brew) • macOS on Mac mini (...

This looks like a wacli-specific issue (wacli is a separate WhatsApp CLI tool, not part of Clawdbot). Based on the symptoms:

What's happening:

  • Authentication works (QR scan āœ…)
  • History sync works (900 chats āœ…)
  • But the WebSocket connection never establishes (CONNECTED=false)
  • Send fails because it can't reach the WhatsApp servers to look up the recipient

Common causes:

  1. Network/firewall - macOS Firewall or Little Snitch blocking wacli's WebSocket connection
  2. Proxy/VPN interference - if you have a VPN, try disabling it
  3. Race condition - the connection might need time to stabilize after auth

Things to try:

  1. sudo lsof -i :443 - check if wacli is actually trying to connect
  2. Check macOS Firewall settings for wacli
  3. Try disabling any VPNs or proxies temporarily
#
  1. Wait a few minutes after auth before sending - sometimes the connection takes time
  2. Check wacli logs: wacli doctor --debug or WACLI_DEBUG=1 wacli doctor

If it persists:

@opaque holly Are you running any security software (Little Snitch, Lulu, etc.) that might block outgoing connections? That'd be my top guess on macOS ARM.

opaque holly
#

Update: Tailscale ruled out

Tested with Tailscale completely disabled on the Mac mini - same "context deadline exceeded" error.

So it's not a VPN/firewall issue. The problem seems to be that:

  1. Auth + initial sync work (WebSocket connects briefly)
  2. But subsequent operations (send) can't establish a new connection
  3. The session might be in "companion mode" ("Keep app open on both devices")
    Could this be related to companion mode vs multi-device mode? The device shows up in Linked Devices but requires phone to be online.
untold frostBOT
# opaque holly Update: Tailscale ruled out Tested with Tailscale completely disabled on the Ma...

That's interesting about companion mode - but actually Linked Devices = normal multi-device behavior, not companion mode. Companion mode is the older "phone must stay online" approach, while multi-device should work independently.

The real puzzle: Initial sync works (brief connection āœ…) but can't reconnect later. This suggests:

  1. Token/expiry issue - the auth token might not persist properly for reconnection

  2. Store corruption - try nuking and re-authenticating:

    rm -rf ~/.wacli
    wacli login  # fresh QR scan
    
  3. Bug in wacli's reconnection logic - worth checking their GitHub issues

Before nuking the store, check if there's a log file:

ls -la ~/.wacli/