Skip to content

[BUG]Baileys sometimes sends messages to incorrect remoteJid (random number that doesn’t exist) #1692

Description

@hassangeekshub

I’m experiencing an intermittent issue with Baileys where my bot sometimes responds to the wrong conversation.

Expected behavior:
When a user sends a message, Baileys should respond to the same remoteJid from which the message was received.

Actual behavior:
Occasionally, Baileys interprets the remoteJid incorrectly.
Example:

Correct remoteJid from incoming message: 123456@s.whatsapp.net but instead received message from 654231@s.whatsapp.net and replying, Baileyssends to 654231@s.whatsapp.net, which is not even an existing WhatsApp number.

This causes the bot to create a new conversation with this random number instead of replying in the correct thread.

Frequency:
Happens sporadically, not every message, but enough to cause problems in production.

Environment:

Baileys version: 6.7.18

Node.js version: 22

Platform: Ubantu

you can see messages are send to a random number

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions