Skip to content

Session disconnecting after a few minutes – connection established but drops unexpectedly #127105

@DevLUKASbr

Description

@DevLUKASbr

Is there an existing issue for this?

  • I have searched the existing issues.

Is this a problem caused by your code, or is it specifically because of the library?

  • I have double-checked my code carefully.

Describe the bug.

Issue Title

Session disconnecting after a few minutes – connection established but drops unexpectedly

Description

Hello everyone.

We are experiencing a recurring issue with session stability using whatsapp-web.js. The connection is established successfully and the client becomes ready, but after a few minutes the session disconnects unexpectedly.

After the disconnection:

  • Messages stop being received
  • Messages cannot be sent
  • The client appears offline in the platform
  • A manual reconnection is required

However, the reconnection does not remain stable either, and after a few minutes the same issue happens again.

Because of this behavior, the platform becomes unusable since the WhatsApp session does not stay connected long enough to operate normally.

Current Behavior

  • WhatsApp session connects normally
  • ready event is triggered
  • Messages can initially be sent/received
  • After a few minutes, the session disconnects unexpectedly
  • The client stops receiving and sending messages
  • Reconnection is required, but the same issue repeats

Expected Behavior

The WhatsApp session should remain connected and stable for long periods (hours/days), without unexpected disconnections.

Additional Context

This issue started happening recently and appears to be affecting multiple services that rely on WhatsApp Web sessions.

We also observed instability across several external services recently (network providers and cloud infrastructure), but the behavior persists even after reconnecting the client.

Because of this, we suspect there may be:

  • A change in WhatsApp Web behavior
  • Session invalidation
  • Connection heartbeat issues
  • New anti-automation/session policies

Logs

  • Typical behavior observed:
  • Session connects successfully
  • After some minutes, client becomes disconnected
  • Platform stops receiving messages
  • Manual reconnection required

If necessary, I can provide additional logs.

Question

Has anyone else experienced sessions disconnecting after a few minutes recently?

Is there any known change in WhatsApp Web or any recommended mitigation to maintain session stability?

Expected Behavior

The WhatsApp session should remain connected and stable for long periods (hours/days), without unexpected disconnections.

Steps to Reproduce the Bug or Issue

Current Behavior

  • WhatsApp session connects normally
  • ready event is triggered
  • Messages can initially be sent/received
  • After a few minutes, the session disconnects unexpectedly
  • The client stops receiving and sending messages
  • Reconnection is required, but the same issue repeats

WhatsApp Account Type

WhatsApp Business

Browser Type

Google Chrome

Operation System Type

Windows

Phone OS Type

Android

WhatsApp-Web.js Version

1.34.6

WhatsApp Web Version

Recente

Node.js Version

22.22.0

Authentication Strategy

LocalAuth

Additional Context

Additional Context

This issue started happening recently and appears to be affecting multiple services that rely on WhatsApp Web sessions.

We also observed instability across several external services recently (network providers and cloud infrastructure), but the behavior persists even after reconnecting the client.

Because of this, we suspect there may be:

A change in WhatsApp Web behavior

Session invalidation

Connection heartbeat issues

New anti-automation/session policies

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions