Baileys
Baileys copied to clipboard
[BUG] No SenderKeyRecord found for decryption
Describe the bug I have a server with 15 connected whatsapp users. I find this on the log from time to time:
{
"level": 50,
"time": 1718907794643,
"pid": 41327,
"hostname": "ip-xxx-xxx-xxx-xxx",
"key": {
"remoteJid": "[email protected]",
"fromMe": false,
"id": "FD997580F27B33CF3430FB6A0D3FA104",
"participant": "[email protected]"
},
"err": {
"type": "Error",
"message": "No SenderKeyRecord found for decryption",
"stack": "Error: No SenderKeyRecord found for decryption
at [email protected]::xxx::0 [as awaitable] (/baileys/WASignalGroup/group_cipher.js:49:15)
at async asyncQueueExecutor (/baileys/WASignalGroup/queue_job.js:20:29)"
},
"msg": "failed to decrypt message"
}
To Reproduce Don't know how to reproduce, it happens from time to time on a server with 15 connected whatsapp users.
Expected behavior No errors on the log
Environment (please complete the following information):
- Is this on a server? yes
- What do your
connectOptions
look like?
const { version, isLatest } = await fetchLatestBaileysVersion()
const { state, saveCreds } = await useMultiFileAuthState('myPath')
const msgRetryCounterCache = new NodeCache()
async function getMessage(key) {
if(store) {
const msg = await store.loadMessage(key.remoteJid, key.id)
return msg?.message || undefined
}
// only if store is present
return proto.Message.fromObject({})
}
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,
markOnlineOnConnect: false
})
- Do you have multiple clients on the same IP? yes, 15 clients
- Are you using a proxy? no
Additional context Using baileys v6.7.5