Skip to content

Upgrade whatsmeow to fix "Client outdated (405)" connect failure - #308

Open
darshmashru wants to merge 1 commit into
lharries:mainfrom
darshmashru:fix/whatsmeow-client-outdated-405
Open

Upgrade whatsmeow to fix "Client outdated (405)" connect failure#308
darshmashru wants to merge 1 commit into
lharries:mainfrom
darshmashru:fix/whatsmeow-client-outdated-405

Conversation

@darshmashru

Copy link
Copy Markdown

Problem

whatsapp-bridge pins whatsmeow to v0.0.0-20250318233852 (March 2025). WhatsApp rejects outdated client versions, so on a fresh setup today the bridge dies during the handshake — before it ever reaches authentication or prints a QR code:

[Client INFO] Starting WhatsApp client...
[Database INFO] Upgrading database to v1
...
[Client ERROR] Client outdated (405) connect failure (client version: 2.3000.1021018791)
[Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

Because it happens before the QR appears, this reads like an expired session or a corrupt store, and the README's "delete both database files and re-authenticate" advice doesn't help — deleting the store and restarting reproduces it exactly.

Fix

Bump whatsmeow to v0.0.0-20260804144817.

Newer whatsmeow threads context.Context through its API, so five call sites need a context argument:

main.go call
client.Download media download
sqlstore.New device store open
container.GetFirstDevice device lookup
client.GetGroupInfo group name resolution
client.Store.Contacts.GetContact contact name resolution

context is already imported. Each of these runs on a path with no existing context to propagate, so context.Background() is used rather than inventing a cancellation scope — happy to rework these to accept a caller-supplied context if you'd prefer that direction.

Testing

Verified on Windows 11, Go 1.26.5, gcc 16.1.0:

  • Bridge completes the WhatsApp handshake and renders the QR code
  • Pairing succeeds, history syncs into store/messages.db
  • REST API serves on :8080 after authentication
  • Message send/read through the MCP server works against the paired session

Building still needs CGO_ENABLED=1 and a C toolchain for go-sqlite3 — unchanged.

Note

The go.sum diff is large because the whatsmeow bump pulls transitive updates (libsignal, go.mau.fi/util, golang.org/x/crypto, protobuf, and a few new indirect deps). Only the three files are touched; no behavioural changes beyond the version bump and the context arguments.

whatsapp-bridge pins whatsmeow to v0.0.0-20250318233852 (March 2025). WhatsApp
rejects outdated client versions, so the bridge now fails during the handshake,
before it ever reaches authentication:

  [Client ERROR] Client outdated (405) connect failure (client version: 2.3000.1021018791)
  [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

This is easy to misread as an expired session or a corrupt store, since it
happens before the QR code is displayed.

Bump whatsmeow to v0.0.0-20260804144817. Newer whatsmeow threads context.Context
through its API, so five call sites need a context argument:

  * client.Download
  * sqlstore.New
  * container.GetFirstDevice
  * client.GetGroupInfo
  * client.Store.Contacts.GetContact

context is already imported, and each of these runs on a request path with no
existing context to propagate, so context.Background() is used.

Verified on Windows: the bridge completes the handshake, renders the QR, pairs,
and serves the REST API on :8080. Building still requires CGO_ENABLED=1 and a
C toolchain for go-sqlite3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant