Skip to content

Frequent 401: logged out from another device on idle multi-device sessions — is this server-side enforcement or client-side? #308

Description

@kemevo

Setup:

WuzAPI latest (image built 2026-05-27), PostgreSQL backend
~40 concurrent sessions, each with dedicated SOCKS5 proxy
Lifecycle events subscribed: Connected, Disconnected, LoggedOut, KeepAliveTimeout, etc.

Observed behavior:
Sessions disconnect in two distinct patterns, several times per night, with no message-sending activity at the time:

Disconnected from Whatsapp reason=&{} — followed by automatic reconnect + OfflineSyncCompleted. Recovers on its own.
Logged out reason="401: logged out from another device" — session is killed, requires full re-pairing. No other device was actually linked or logged out by us. We physically hold all SIMs; nobody touched the linked devices list.

Logs (pattern 2):
INFO Logged out reason="401: logged out from another device"
Data being sent to webhook ... {"event":{"OnConnect":false,"Reason":401},"type":"LoggedOut"}
Questions:

Is 401: logged out from another device always a genuine multi-device logout, or can WhatsApp send this code as a silent enforcement/flagging mechanism (similar to what's described in tulir/whatsmeow#877 and #989)?
Does the recent whatsmeow update change how 401 LoggedOut is surfaced?
For idle (no-send) sessions getting reason=&{} disconnects — is there any client-side keepalive tuning exposed via WuzAPI, or is this purely network/proxy-dependent?

Context: All sessions share the same proxy ASN range and paired with same mobilephone. We suspect IP reputation is a factor, but want to confirm whether the 401 code itself is diagnostic of multi-device logout vs. server-side enforcement before investing in proxy migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions