Baileys: [BUG] Receiving invalid message from events['messages.upsert']
Describe the bug A clear and concise description of what the bug is. On events[‘messages.upsert’] I got invalid message content with structure like this :
{ “key”: { “remoteJid”: “xxxxxx@s.whatsapp.net”, “fromMe”: false, “id”: “sensored” }, “messageTimestamp”: 1686622027, “pushName”: “My Customer Name”, “messageStubType”: 2, “messageStubParameters”: [ “Message absent from node” ] }
To Reproduce Steps to reproduce the behavior:
- Created a new connection
- Send message to connected number
- console.log() on events[‘messages.upsert’] value or save every events to DB
Expected behavior A clear and concise description of what you expected to happen. Message content displayed are appropriate on whatsapp (only normal text)
Environment (please complete the following information):
-
Is this on a server? yes
-
What do your
connectOptions
look like? const sock = makeWASocket({ version: [2,2323,4], printQRInTerminal: true, patchMessageBeforeSending: (message) => { const requiresPatch = !!( message.buttonsMessage || message.templateMessage || message.listMessage ); if (requiresPatch) { message = { viewOnceMessage: { message: { messageContextInfo: { deviceListMetadataVersion: 2, deviceListMetadata: {}, }, …message, }, }, }; }return message; }, auth: state, markOnlineOnConnect: false, generateHighQualityLinkPreview: true, shouldIgnoreJid: jid => isJidStatusBroadcast(jid), defaultQueryTimeoutMs: undefined });
-
Do you have multiple clients on the same IP? no
-
Are you using a proxy? no
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 30 (5 by maintainers)
Same thing here. i am working on a proper fix for the retry system so I am getting a few logs from some clients who have this issue. We’ll work on this and get it just as pristine as the official whatsapp web app
Solution found, fixing.
EDIT: NEW PR OUT #554
Message absent from node, most probably a bug from WA itself, especially when it comes to adreply (advertising link from FB) message.
Just to clarify, you can compare the actual message that appears on our device but not on web WA. When this happens, Bailey will not be able to decrypt the message since it is already broken within web WA itself.
The situation is completely different when sending a message through baileys. We have a function to retry and resend the failed message.
@azudindaem Just to confirm, can I say that for now this issue is still an unknown, and there is no way for us to retrieve the actual message in Baileys when we get the “Message absent from node” response, correct?