Skip to content

Incoming message events don’t fire reliably; messages appear with delay #5765

@Svtant

Description

@Svtant

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.

Incoming WhatsApp messages sometimes do not trigger message/message_create events in real time. Messages only show up after a delay when a fallback poller runs.

Environment

OS: Linux
Node.js: 20.19.5
whatsapp-web.js: 1.34.4
puppeteer: 24.29.1
Runtime: PM2 (fork mode)

Expected Behavior

Expected behavior
Incoming messages should fire events immediately and be logged/stored in real time.

Actual behavior
Events do not fire for some incoming messages. Messages appear only after a delay (via fallback polling). No immediate log output.

Steps to Reproduce the Bug or Issue

Steps to reproduce

Start the service with WhatsApp clients connected.
Send a message to a connected account.
Observe that logs are sometimes delayed or missing until later.

Suggested investigation

Check if message/message_create can silently fail while client state remains CONNECTED.
Verify if page detachment or internal conflict conditions can suppress event emission.
Add logging around event subscriptions and WhatsApp Web state transitions.
If you want, I can tailor the repro steps or add logs.

WhatsApp Account Type

Standard

Browser Type

Google Chrome

Operation System Type

Linux

Phone OS Type

Other

WhatsApp-Web.js Version

1.34.4

WhatsApp Web Version

whatsapp-web.js: 1.34.4 puppeteer: 24.29.1

Node.js Version

20.19.5.

Authentication Strategy

LocalAuth

Additional Context

Clients report CONNECTED state.
Sessions are authenticated and ready.
No critical runtime errors at the moment of missing events.
Delay is visible because the app polls unread chats only if events are idle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions