Open oscarguindzberg opened 3 months ago
yo
wroking on this
@PurpShell glad to help, but I don't know exactly where to start. I guess bugfix should be here: https://github.com/oscarguindzberg/Baileys/commit/c834bc563403bfcbfe981ffb8560068c0fd5045c
I am familiar with baileys development, so I still don't know:
I could run the commit with extra console.log() on my prod env until I the event is reproduced.
any thoughts?
I will be porting this from whatsmeow to node soon! tulir/whatsmeow#615
Describe the bug Error logged: "Unknown e2e type: msmsg"
This is the line that throws the error: throw new Error(
Unknown e2e type: ${e2eType}
);This is the full log: {"level":50,"time":1716567616259,"pid":2188,"hostname":"ip-172-31-81-30","key":{"remoteJid":"xxx@s.whatsapp.net","fromMe":false,"id":"xxxsss"},"err":{"type":"Error","message":"Unknown e2e type: msmsg","stack":"Error: Unknown e2e type: msmsg\n at decrypt (//baileys/lib/Utils/decode-wa-message.js:147:39)\n at baileys/lib/Socket/messages-recv.js:572:23\n at baileys/lib/Utils/make-mutex.js:18:42\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 0)\n at async handleMessage (baileys/lib/Socket/messages-recv.js:570:9)\n at async processNodeWithBuffer (baileys/lib/Socket/messages-recv.js:688:9)"},"msg":"failed to decrypt message"}
Note: I have a modified decode-wa-message.js, so line decode-wa-message.js:147:39 won't match.
To Reproduce Steps to reproduce the behavior: Don't know how to reproduce it. I just got 15 errors like this on the log on a production environment, don't know the root cause.
Expected behavior No error logged.
Environment (please complete the following information):
What do your
connectOptions
look like? const { version, isLatest } = await fetchLatestBaileysVersion() const sock = makeWASocket({ version, logger, printQRInTerminal: false, mobile: false, auth: { creds: state.creds, keys: makeCacheableSignalKeyStore(state.keys, logger), }, msgRetryCounterCache, generateHighQualityLinkPreview: true, // ignore broadcast and newsletter messages. shouldIgnoreJid: jid => !jid || isJidBroadcast(jid) || isJidNewsletter(jid), // implement to handle retries & poll updates getMessage, shouldSyncHistoryMessage: () => true })const isJidNewsletter = (jid: string | undefined) => (jid?.endsWith('@newsletter'))
Additional context