Baileys
Baileys copied to clipboard
[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": "[email protected]", "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.
up
#oot Can you share complete source code for send message using this project?
anyone know to solve this issue ??
I am facing the same issue here. Some of the numbers initiating their messages seems to have the "Message absent from node" issue, and the text message is not available. Any pointers on how to solve such issue?
I am facing the same issue here. Some of the numbers initiating their messages seems to have the "Message absent from node" issue, and the text message is not available. Any pointers on how to solve such issue?
are you guys not getting the message later? it's just failed on first decryption or else and will be retried. you'll get the message later after successful decryption or retry, in my case the longest take +- 5 seconds.
I am facing the same issue here. Some of the numbers initiating their messages seems to have the "Message absent from node" issue, and the text message is not available. Any pointers on how to solve such issue?
are you guys not getting the message later? it's just failed on first decryption or else and will be retried. you'll get the message later after successful decryption or retry, in my case the longest take +- 5 seconds.
I am not getting any message later, and also not getting any retries. The sender sent the second message and still get the similar "Message absent from node" issue.
But after asking the sender to add our number as contact, the third message is able to be retrieved. However, it would be impossible to ask all our users to add our number as contact. How do you manage to retrieve the decrypted message?
I am facing the same issue here. Some of the numbers initiating their messages seems to have the "Message absent from node" issue, and the text message is not available. Any pointers on how to solve such issue?
are you guys not getting the message later? it's just failed on first decryption or else and will be retried. you'll get the message later after successful decryption or retry, in my case the longest take +- 5 seconds.
I am not getting any message later, and also not getting any retries. The sender sent the second message and still get the similar "Message absent from node" issue.
But after asking the sender to add our number as contact, the third message is able to be retrieved. However, it would be impossible to ask all our users to add our number as contact. How do you manage to retrieve the decrypted message?
are you messing with auth keys? are you using useMultiFileAuthState or custom storage? i don't do any fancy code, but the incoming message will be retried and available some time later,
this happen few minutes ago and i have it few seconds later.
I am facing the same issue here. Some of the numbers initiating their messages seems to have the "Message absent from node" issue, and the text message is not available. Any pointers on how to solve such issue?
are you guys not getting the message later? it's just failed on first decryption or else and will be retried. you'll get the message later after successful decryption or retry, in my case the longest take +- 5 seconds.
I am not getting any message later, and also not getting any retries. The sender sent the second message and still get the similar "Message absent from node" issue. But after asking the sender to add our number as contact, the third message is able to be retrieved. However, it would be impossible to ask all our users to add our number as contact. How do you manage to retrieve the decrypted message?
are you messing with auth keys? are you using useMultiFileAuthState or custom storage? i don't do any fancy code, but the incoming message will be retried and available some time later,
this happen few minutes ago and i have it few seconds later.
I run the Baileys node with the --no-store option because the store writing is taking up much server resources and eventually slows down the server. Do I need to enable store in order for the retry to work?
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.
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?
UP
I have the same issue I think is because some setting like this
I have the same issue I think is because some setting like this
It is correct this message is generated when there is a time update of messages that disappear I share with you one of these update messages, therefore you should keep this update on the chat in mind to avoid having this inconvenience
guys, disappearing message aren't the same issue – they aren't even an issue.
up
up
up
Investigating, been noticing this more and more
EDIT 1: It seems the message retry system itself is failing
I am getting this for new chats too. It seems random. The retry system sometimes works and sometimes not.
I don't know if it's the same problem but here the ev['messages.upsert'] out of nowhere stops working and sometimes even restarting the application it still doesn't receive the messages only after restarting several times it works fine again, but it's a bug that has happened frequently
I don't know if it's the same problem but here the ev['messages.upsert'] out of nowhere stops working and sometimes even restarting the application it still doesn't receive the messages only after restarting several times it works fine again, but it's a bug that has happened frequently
Out of topic, you need to restart frequently
I am getting this for new chats too. It seems random. The retry system sometimes works and sometimes not.
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
Também estou recebendo isso para novos bate-papos. Parece aleatório. O sistema de nova tentativa às vezes funciona e às vezes não.
Mesma coisa aqui. estou trabalhando em uma correção adequada para o sistema de nova tentativa, por isso estou recebendo alguns registros de alguns clientes que têm esse problema. Trabalharemos nisso e o deixaremos tão puro quanto o aplicativo web oficial do Whatsapp
Hello friend @PurpShell .Did you get any solution on this, I'm having a lot of problems with some customers
Has anyone got progress on this?
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.
Does this means if first we were getting a message absent from node, baileys will retry to decrypt again and send another upsert event when it was successful?
after testing on active fbads there are still appear
{
"messages": [
{
"key": {
"remoteJid": "[email protected]",
"fromMe": false,
"id": "C667337FC2A7xxxx"
},
"messageTimestamp": 1703033961,
"pushName": "xxx",
"broadcast": false,
"messageStubType": 2,
"messageStubParameters": [
"Message absent from node"
]
}
],
"type": "notify",
"jid": "[email protected]",
"hasNewMessage": true
}
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.
Does this means if first we were getting a message absent from node, baileys will retry to decrypt again and send another upsert event when it was successful?
It will send a message.update! @azudindaem as well, this is expected. What happened before was that we couldn't parse the response, we were sending a retry but not parsing the response. After parsing, messages.update gives you the new message. Handle it there
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.
Does this means if first we were getting a message absent from node, baileys will retry to decrypt again and send another upsert event when it was successful?
It will send a message.update! @azudindaem as well, this is expected. What happened before was that we couldn't parse the response, we were sending a retry but not parsing the response. After parsing, messages.update gives you the new message. Handle it there
It works very nice, thanks you @PurpShell
When a new version with this PR is release?