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

Abierto
#228 4 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 9 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Go
Estrellas
1k
Forks
610
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de evolution-foundation/evolution-go

Todos los issues de evolution-foundation/evolution-go

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.