Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

[BUG] Message absent from node

Open makanSukros opened this issue 1 year ago • 14 comments

Describe the bug Today I encountered a strange bug, when someone sends a message to my number (as a bot) I don't receive the message content perfectly but I get a messageStubType 2 message with the content "Message absent from node", is anyone experiencing the same thing with me?

Response from message.upsert {"key":{"remoteJid":"[email protected]","fromMe":false,"id":"3EB0EA33EA903CEE6C34"},"messageTimestamp":1658994332,"pushName":"Mas Prayogi","messageStubType":2,"messageStubParameters":["Message absent from node"]}

makanSukros avatar Jul 28 '22 07:07 makanSukros

Same issue here, this bug appears when people send via wa desktop

noiseXfragment avatar Jul 28 '22 07:07 noiseXfragment

Got the same problem here,, anyone?

anaksustagen avatar Jul 28 '22 08:07 anaksustagen

me too, but it seems back to normal for now, it happend about 5 hours ago

Fonnte avatar Jul 28 '22 08:07 Fonnte

me too, but it seems back to normal for now, it happend about 5 hours ago

Until now I'm still experiencing this bug

makanSukros avatar Jul 28 '22 08:07 makanSukros

is your bot not replying due to absent from node? or your bot not getting the message?

Fonnte avatar Jul 28 '22 08:07 Fonnte

{"key":{"remoteJid":"[email protected]","fromMe":false,"id":"3EB0EA33EA903CEE6C34"},"messageTimestamp":1658994332,"pushName":"Mas Prayogi","messageStubType":2,"messageStubParameters":["Message absent from node"]}

bot only receiving like this from message upsert

{"key":{"remoteJid":"[email protected]","fromMe":false,"id":"3EB0EA33EA903CEE6C34"},"messageTimestamp":1658994332,"pushName":"Mas Prayogi","messageStubType":2,"messageStubParameters":["Message absent from node"]}

makanSukros avatar Jul 28 '22 08:07 makanSukros

What version of Baileys are you using?

Heknon avatar Jul 28 '22 15:07 Heknon

What version of Baileys are you using?

Im using latest edge version

makanSukros avatar Jul 28 '22 15:07 makanSukros

this problem appears when the message is sent via whatsapp desktop, if the message is sent from the device everything is normal

makanSukros avatar Jul 28 '22 15:07 makanSukros

This problem occurs when we send from web whatsapp to device Sending from baileys to device is okay (but not appear in web whatsapp) Sending from device is okay Its looks like failure in decrypting message

remove node_modules and reinstall the dependencies and reconnect

MaznAbdullah avatar Jul 28 '22 22:07 MaznAbdullah

This problem occurs when we send from web whatsapp to device Sending from baileys to device is okay (but not appear in web whatsapp) Sending from device is okay Its looks like failure in decrypting message

remove node_modules and reinstall the dependencies and reconnect

Tried before, for a while the message managed to get in, but in a few hours later the message from wa desktop didn't come back with the message absent from node

makanSukros avatar Jul 29 '22 03:07 makanSukros

same here

textarea avatar Aug 02 '22 06:08 textarea

It turns out that when I get an error message absent from node, I also get an error message "Closing stale open session for new outgoing prekey bundle" at the same time.

makanSukros avatar Aug 03 '22 09:08 makanSukros

Same here. Any update?

riozee avatar Aug 08 '22 10:08 riozee

Just got this error right now.

dnl4 avatar Aug 12 '22 18:08 dnl4

+1

Alhar6i avatar Aug 13 '22 19:08 Alhar6i

i got this error too when i am sending message from new contact to my bot. i have testing it with several number and it always return the same Message absent from node error.

{"level":50,"time":1660805408150,"pid":28872,"hostname":"Heriyantos-MacBook-Pro.local","key":{"remoteJid":"[email protected]","fromMe":false,"id":"B04B96D9E29FABCC1B9EB879F7352BF9"},"params":["Message absent from node"],"msg":"failure in decrypting message"}

hbinduni avatar Aug 18 '22 06:08 hbinduni

The problem relates to decoding frame. We do not receive 'enc' single byte token and it's content from WA. This is how it looks like:

{
    "tag": "message",
    "attrs": {
        "from": "",
        "type": "",
        "id": "",
        "notify": "",
        "t": ""
    },
    "content": [
        {
            "tag": "url_text",
            "attrs": {}
        },
        {
            "tag": "url_number",
            "attrs": {}
        },
        {
            "tag": "unavailable",
            "attrs": {}
        }
    ]
}

And how normal message looks:

{
    "tag": "message",
    "attrs": {
        "from": "",
        "type": "",
        "id": "84839B8B27986549C4C4AD8C25B4C664",
        "recipient": "",
        "verified_level": "unknown",
        "notify": "",
        "verified_name": "",
        "t": ""
    },
    "content": [
        {
            "tag": "enc",
            "attrs": {
                "v": "2",
                "type": "pkmsg"
            },
            "content": {
                "type": "Buffer",
                "data": []
            }
        },
        {
            "tag": "url_text",
            "attrs": {}
        },
        {
            "tag": "url_number",
            "attrs": {}
        }
    ]
}

We see that there is no 'enc' tag in the first message. But occasionally it is normal since we do retry (and whatsapp web sure also does ). Baileys indeed after receiving corrupted message sends a retry request from here https://github.com/adiwajshing/Baileys/blob/master/src/Socket/messages-recv.ts#L141 but after 1 attempt it does not receive any response on this request from WA. I assume retry receipt request is somehow mailformed. Most likely tag 'keys'

Or maybe we need to do more that 1 retry receipt request in this case even if we do not receive anything from wa socket

ripreal avatar Aug 18 '22 17:08 ripreal

But occasionally it is normal since we do retry...

Does this mean that it will always work properly? In other words: Will we always be able to read the text even if we get the "failure in decrypting message" warning before the retry?

dnl4 avatar Aug 20 '22 00:08 dnl4

But occasionally it is normal since we do retry...

Does this mean that it will always work properly? In other words: Will we always be able to read the text even if we get the "failure in decrypting message" warning before the retry?

No. Message from whatsapp does not contain any binary content. Only meta data (tag, attrs etc) There is nothing to decrypt.

ripreal avatar Aug 20 '22 08:08 ripreal

This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days

github-actions[bot] avatar Aug 27 '22 03:08 github-actions[bot]