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

オープン
#228 コメント 4 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 9 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
Go
スター
1k
フォーク
610
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

evolution-foundation/evolution-go のほかの issue

evolution-foundation/evolution-go の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。