WhatsAppToDiscord
WhatsAppToDiscord copied to clipboard
Bot only sends some messages
It sends less than half the messages to discord It runs in a docker container
{"level":30,"time":1659005689228,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Starting"} {"level":30,"time":1659005689590,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Update checked."} {"level":30,"time":1659005689605,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Initialized database."} {"level":30,"time":1659005689609,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Loaded settings."} {"level":30,"time":1659005689611,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Loaded contacts."} {"level":30,"time":1659005689613,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Loaded chats."} {"level":30,"time":1659005690301,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Discord client started."} {"level":30,"time":1659005701680,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"Repaired channels."} {"level":30,"time":1659005701889,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"WhatsApp client started."} Bot is now running. Press CTRL-C to exit. {"level":30,"time":1659005701991,"pid":10,"hostname":"local-whatsapp-to-discord","browser":["Baileys","Chrome","4.0.0"],"helloMsg":{"clientHello":{"ephemeral":"?secret?="}},"registrationId":165,"msg":"connected to WA Web"} {"level":30,"time":1659005702045,"pid":10,"hostname":"local-whatsapp-to-discord","node":{"username":"?secret?","passive":true,"userAgent":{"platform":"WEB","appVersion":{"primary":2,"secondary":2226,"tertiary":5},"mcc":"000","mnc":"000","osVersion":"0.1","manufacturer":"","device":"Desktop","osBuildNumber":"0.1","releaseChannel":"RELEASE","localeLanguageIso6391":"en","localeCountryIso31661Alpha2":"US"},"webInfo":{"webSubPlatform":"WEB_BROWSER"},"connectType":"WIFI_UNKNOWN","connectReason":"USER_ACTIVATED","device":21},"msg":"logging in..."} {"level":30,"time":1659005702413,"pid":10,"hostname":"local-whatsapp-to-discord","fromTimestamp":1659002641,"msg":"requesting account sync"} {"level":30,"time":1659005702538,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"22 pre-keys found on server"} {"level":30,"time":1659005702578,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"opened connection to WA"} {"level":50,"time":1659005702736,"pid":10,"hostname":"local-whatsapp-to-discord","trace":"TypeError: Cannot destructure property 'user' of '(0 , exports.jidDecode)(...)' as it is undefined.\n at jidNormalizedUser (/snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/WABinary/jid-utils.js:49:13)\n at /snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Socket/messages-recv.js:325:71\n at Array.map (<anonymous>)\n at /snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Socket/messages-recv.js:322:59\n at /snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Utils/make-mutex.js:16:24\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","msg":"unexpected error in 'handling receipt'"} {"level":50,"time":1659005702737,"pid":10,"hostname":"local-whatsapp-to-discord","trace":"TypeError: Cannot destructure property 'user' of '(0 , exports.jidDecode)(...)' as it is undefined.\n at jidNormalizedUser (/snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/WABinary/jid-utils.js:49:13)\n at /snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Socket/messages-recv.js:325:71\n at Array.map (<anonymous>)\n at /snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Socket/messages-recv.js:322:59\n at /snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Utils/make-mutex.js:16:24\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async handleReceipt (/snapshot/WhatsAppToDiscord/node_modules/@adiwajshing/baileys/lib/Socket/messages-recv.js:312:9)","msg":"unexpected error in 'handling receipt'"} {"level":30,"time":1659005702738,"pid":10,"hostname":"local-whatsapp-to-discord","msg":"got 2 offline messages/notifications"}
Starting the bot and sending a message in a whatsapp group does nothing. Sending a second message makes the bot redirect the second one (without logging anything), but the first one is lost forever.
I'm aware of this issue, but couldn't find what is causing it. It is random too. Sometimes sends the first message and sometimes it doesn't. Just going to leave this bug open, in case I find a solution/reason in the future.