Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix message retry mechanisms #679

Merged
merged 8 commits into from
Mar 19, 2024
Merged

Fix message retry mechanisms #679

merged 8 commits into from
Mar 19, 2024

Conversation

PurpShell
Copy link
Collaborator

@PurpShell PurpShell commented Mar 12, 2024

Hey everyone! This fixes the "Message missing in node" error! Please take a look!

Big thanks to my Sponsors, they allow me to to do work like this. Check out my Sponsors page and donate if you can, it means a lot!
Support my work on GitHub Sponsors

@whiskeysockets-bot
Copy link
Contributor

Thanks for your contribution.

The next step is to wait for review and approval to merge it to main repository

The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it.

To test this PR you can run the following command below:

# NPM
npm install @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-missing-messages
# YARN v2
yarn add @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-missing-messages

@ibinetwork
Copy link

ibinetwork commented Mar 12, 2024

@edgardmessias @Auties00 @canove

Please aprove this, for all S2

canove
canove previously approved these changes Mar 12, 2024
@canove canove self-requested a review March 12, 2024 21:34
canove
canove previously requested changes Mar 12, 2024
src/Socket/messages-recv.ts Outdated Show resolved Hide resolved
@PurpShell PurpShell requested a review from canove March 13, 2024 01:25
@PurpShell PurpShell linked an issue Mar 13, 2024 that may be closed by this pull request
Copy link
Contributor

@azudindaem azudindaem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with newly fbads button and works.. great job!!

@mfirdausazizi
Copy link

mfirdausazizi commented Mar 13, 2024

Thanks @PurpShell

Tested on a freshly registered WhatsApp account and seeing a massive improvement.

Only 1 message failed to be found. Not sure what happened.

{ "level": 20, "time": "2024-03-13T07:24:43.454Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "notification", "attrs": { "from": "[email protected]", "type": "privacy_token", "id": "2230837972", "t": "1710314682" } }, "sent": { "id": "2230837972", "to": "[email protected]", "class": "notification", "type": "privacy_token" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:43.742Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "notification", "attrs": { "from": "[email protected]", "type": "privacy_token", "id": "3911202524", "t": "1710314683" } }, "sent": { "id": "3911202524", "to": "[email protected]", "class": "notification", "type": "privacy_token" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:43.754Z", "pid": 1099062, "hostname": "censored", "tag": "message", "attrs": { "from": "[email protected]", "type": "text", "id": "3ABF23C80CCD656C59E1", "sender_lid": "102160192766119@lid", "notify": "Nurul Syahida Hasbullah", "t": "1710314683" }, "content": [ { "tag": "url_text", "attrs": {} }, { "tag": "url_number", "attrs": {} }, { "tag": "unavailable", "attrs": {} } ], "msg": "missing body; sending ack then ignoring." } { "level": 20, "time": "2024-03-13T07:24:43.754Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "message", "attrs": { "from": "[email protected]", "type": "text", "id": "3ABF23C80CCD656C59E1", "sender_lid": "102160192766119@lid", "notify": "Nurul Syahida Hasbullah", "t": "1710314683" } }, "sent": { "id": "3ABF23C80CCD656C59E1", "to": "[email protected]", "class": "message", "type": "text", "from": "hidden:[email protected]" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:52.893Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "receipt", "attrs": { "from": "[email protected]", "type": "read", "id": "3ABF23C80CCD656C59E1", "recipient": "[email protected]", "t": "1710314692" } }, "sent": { "id": "3ABF23C80CCD656C59E1", "to": "[email protected]", "class": "receipt", "recipient": "[email protected]", "type": "read" }, "msg": "sent ack" }

@PurpShell
Copy link
Collaborator Author

Thanks @PurpShell

Tested on a freshly registered WhatsApp account and seeing a massive improvement.

Only 1 message failed to be found. Not sure what happened.

{ "level": 20, "time": "2024-03-13T07:24:43.454Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "notification", "attrs": { "from": "[email protected]", "type": "privacy_token", "id": "2230837972", "t": "1710314682" } }, "sent": { "id": "2230837972", "to": "[email protected]", "class": "notification", "type": "privacy_token" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:43.742Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "notification", "attrs": { "from": "[email protected]", "type": "privacy_token", "id": "3911202524", "t": "1710314683" } }, "sent": { "id": "3911202524", "to": "[email protected]", "class": "notification", "type": "privacy_token" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:43.754Z", "pid": 1099062, "hostname": "censored", "tag": "message", "attrs": { "from": "[email protected]", "type": "text", "id": "3ABF23C80CCD656C59E1", "sender_lid": "102160192766119@lid", "notify": "Nurul Syahida Hasbullah", "t": "1710314683" }, "content": [ { "tag": "url_text", "attrs": {} }, { "tag": "url_number", "attrs": {} }, { "tag": "unavailable", "attrs": {} } ], "msg": "missing body; sending ack then ignoring." } { "level": 20, "time": "2024-03-13T07:24:43.754Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "message", "attrs": { "from": "[email protected]", "type": "text", "id": "3ABF23C80CCD656C59E1", "sender_lid": "102160192766119@lid", "notify": "Nurul Syahida Hasbullah", "t": "1710314683" } }, "sent": { "id": "3ABF23C80CCD656C59E1", "to": "[email protected]", "class": "message", "type": "text", "from": "hidden:[email protected]" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:52.893Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "receipt", "attrs": { "from": "[email protected]", "type": "read", "id": "3ABF23C80CCD656C59E1", "recipient": "[email protected]", "t": "1710314692" } }, "sent": { "id": "3ABF23C80CCD656C59E1", "to": "[email protected]", "class": "receipt", "recipient": "[email protected]", "type": "read" }, "msg": "sent ack" }

Keep in mind there could be some other types of errors occuring other than this one. One I've seen circulate often is the ID one

@mfirdausazizi
Copy link

Thanks @PurpShell
Tested on a freshly registered WhatsApp account and seeing a massive improvement.
Only 1 message failed to be found. Not sure what happened.
{ "level": 20, "time": "2024-03-13T07:24:43.454Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "notification", "attrs": { "from": "[email protected]", "type": "privacy_token", "id": "2230837972", "t": "1710314682" } }, "sent": { "id": "2230837972", "to": "[email protected]", "class": "notification", "type": "privacy_token" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:43.742Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "notification", "attrs": { "from": "[email protected]", "type": "privacy_token", "id": "3911202524", "t": "1710314683" } }, "sent": { "id": "3911202524", "to": "[email protected]", "class": "notification", "type": "privacy_token" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:43.754Z", "pid": 1099062, "hostname": "censored", "tag": "message", "attrs": { "from": "[email protected]", "type": "text", "id": "3ABF23C80CCD656C59E1", "sender_lid": "102160192766119@lid", "notify": "Nurul Syahida Hasbullah", "t": "1710314683" }, "content": [ { "tag": "url_text", "attrs": {} }, { "tag": "url_number", "attrs": {} }, { "tag": "unavailable", "attrs": {} } ], "msg": "missing body; sending ack then ignoring." } { "level": 20, "time": "2024-03-13T07:24:43.754Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "message", "attrs": { "from": "[email protected]", "type": "text", "id": "3ABF23C80CCD656C59E1", "sender_lid": "102160192766119@lid", "notify": "Nurul Syahida Hasbullah", "t": "1710314683" } }, "sent": { "id": "3ABF23C80CCD656C59E1", "to": "[email protected]", "class": "message", "type": "text", "from": "hidden:[email protected]" }, "msg": "sent ack" } { "level": 20, "time": "2024-03-13T07:24:52.893Z", "pid": 1099062, "hostname": "censored", "recv": { "tag": "receipt", "attrs": { "from": "[email protected]", "type": "read", "id": "3ABF23C80CCD656C59E1", "recipient": "[email protected]", "t": "1710314692" } }, "sent": { "id": "3ABF23C80CCD656C59E1", "to": "[email protected]", "class": "receipt", "recipient": "[email protected]", "type": "read" }, "msg": "sent ack" }

Keep in mind there could be some other types of errors occuring other than this one. One I've seen circulate often is the ID one

I see. Must be a separate error / bug. Thanks for the hard work.

@ibinetwork
Copy link

@canove trancou o pull request rsrsrs... libera ai :)

@Auties00 Auties00 merged commit 1896ebe into master Mar 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Messages upsert missing message property