fix(whatsmeow): call store.SetWAVersion with dynamic webVersion to prevent 405 Client Outdated

Open
#228 4 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 9 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Start with pkg/whatsmeow/service/whatsmeow.go, reading StartClient and fetchWhatsAppWebVersion() to see how the retrieved version reaches the device properties and the handshake. Check how store.SetWAVersion is used and verify the version values in both paths. Done means the Noise handshake uses the retrieved web version and connections no longer fail with 405; run the relevant Go tests.

Written by the indexing model from the issue text.

Description

Problem Description

WhatsApp has deprecated client version 2.3000.1042386815 today (Nov 2, 2026), resulting in all connections failing during the WebSocket handshake with:

<failure location="frc" reason="405"/>
[Client ERROR] Client outdated (405) connect failure (client version: 2.3000.1042386815)
Root Cause

In pkg/whatsmeow/service/whatsmeow.go, the function fetchWhatsAppWebVersion() successfully retrieves the latest web version (e.g. 2.3000.1052769028), and sets store.DeviceProps.Version.

However, whatsmeow uses store.GetWAVersion() and store.BaseClientPayload.UserAgent.AppVersion for the Noise handshake payload, which remains hardcoded to the older version compiled into whatsmeow.

Because store.SetWAVersion was never invoked, WhatsApp's server rejects the connection with HTTP 405.

Proposed Solution

In pkg/whatsmeow/service/whatsmeow.go, call store.SetWAVersion(...) whenever the web version is determined or retrieved:

  1. In StartClient:
if version.Major != 0 && version.Minor != 0 && version.Patch != 0 {
    store.SetWAVersion(store.WAVersionContainer{uint32(version.Major), uint32(version.Minor), uint32(version.Patch)})
}
  1. Inside fetchWhatsAppWebVersion() when clientRevision > 0:
store.SetWAVersion(store.WAVersionContainer{2, 3000, uint32(clientRevision)})

We tested this patch in production and all instances immediately reconnected to WhatsApp Web without requiring re-pairing (no QR code needed).

Dominant language
Go
Stars
1k
Forks
610
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-go

All issues in evolution-foundation/evolution-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.