Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

[BUG] - Commit Mutation

Open Maimbe opened this issue 5 months ago • 0 comments

Describe the bug The bot intermittently fails to send messages or commit changes to WhatsApp using the Baileys client. The logs frequently show errors like failed to commit mutations, tries left=X, where X counts down to 0, after which the message fails completely. This happens even during normal bot operation, such as sending responses to commands.

To Reproduce Steps to reproduce the behavior:

Connect the bot to WhatsApp Web using Baileys. Issue a command like !meta or !help. Observe the logs as Baileys attempts to commit changes (send messages). Repeated errors show: failed to commit X mutations, where X decreases over time. Expected behavior The bot should send messages and commit changes to WhatsApp Web without encountering mutation commit failures, ensuring smooth communication.

Environment (please complete the following information): Is this on a server? Yes, the bot is hosted on an Ubuntu server. What do your connectOptions look like? Using default connection options with Baileys for WhatsApp Web. Do you have multiple clients on the same IP? No, only a single bot client is connected on this IP. Are you using a proxy? No, a direct connection without a proxy. Additional context The issue seems to occur randomly, even when the connection is stable. After repeated failed mutation commits, the bot eventually fails to send certain messages or handle commands. The mutation failure count starts high (e.g., 8 tries) and decreases to 0, leading to message loss.

this error: 0|meu_bot | {"level":40,"time":"2024-09-25T00:09:42.130Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=6"} 0|meu_bot | [0] {"level":40,"time":"2024-09-25T00:09:45.134Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=5"} 0|meu_bot | [0] {"level":40,"time":"2024-09-25T00:09:48.137Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=4"} 0|meu_bot | [0] {"level":40,"time":"2024-09-25T00:09:51.141Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=3"} 0|meu_bot | [0] {"level":40,"time":"2024-09-25T00:09:54.146Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=2"} 0|meu_bot | [0] 0|meu_bot | {"level":40,"time":"2024-09-25T00:09:57.149Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=1"} 0|meu_bot | [0] {"level":40,"time":"2024-09-25T00:10:00.151Z","pid":6645,"hostname":"whatsboot","class":"baileys","msg":"failed to commit 3 mutations, tries left=0"}

Maimbe avatar Sep 25 '24 00:09 Maimbe