Upgrade whatsmeow to fix "Client outdated (405)" connect failure - #308
Open
darshmashru wants to merge 1 commit into
Open
Upgrade whatsmeow to fix "Client outdated (405)" connect failure#308darshmashru wants to merge 1 commit into
darshmashru wants to merge 1 commit into
Conversation
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.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
whatsapp-bridgepins whatsmeow tov0.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: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.Contextthrough its API, so five call sites need a context argument:main.goclient.Downloadsqlstore.Newcontainer.GetFirstDeviceclient.GetGroupInfoclient.Store.Contacts.GetContactcontextis already imported. Each of these runs on a path with no existing context to propagate, socontext.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:
store/messages.db:8080after authenticationBuilding still needs
CGO_ENABLED=1and a C toolchain forgo-sqlite3— unchanged.Note
The
go.sumdiff 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.