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

[BUG] No session found to decrypt message #886

Open
oscarguindzberg opened this issue Jun 21, 2024 · 19 comments
Open

[BUG] No session found to decrypt message #886

oscarguindzberg opened this issue Jun 21, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@oscarguindzberg
Copy link
Contributor

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": 1718906974900,
  "pid": 41327,
  "hostname": "ip-xxx-xxx-xxx-xxx",
  "key": {
    "remoteJid": "[email protected]",
    "fromMe": false,
    "id": "xxx",
    "participant": "[email protected]"
  },
  "err": {
    "type": "Error",
    "message": "No session found to decrypt message",
    "stack": "Error: No session found to decrypt message\n at [email protected]::xxx::0 [as awaitable]   
     (/baileys/WASignalGroup/group_cipher.js:54: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

@oscarguindzberg oscarguindzberg added the bug Something isn't working label Jun 21, 2024
@oscarguindzberg
Copy link
Contributor Author

oscarguindzberg commented Jun 21, 2024

These bugs may be related
#885
#886
#888

@ErgashevAkbarjon
Copy link

I do have the same issue. Also have multiple connected WA numbers.

@ErgashevAkbarjon
Copy link

Maybe it's all because of using already an old and archived(by ForstaLabs) version of libsignal-node package. Maybe it's better to move to official package from signalapp ?

@dephea
Copy link

dephea commented Jun 28, 2024

Same issue

@joaosouz4dev
Copy link

Same here.
"err": { "type": "Error", "message": "No SenderKeyRecord found for decryption", "stack": "Error: No SenderKeyRecord found for decryption\n at <ID>@g.us::<NUM>::0 [as awaitable] (/app/node_modules/@whiskeysockets/baileys/WASignalGroup/group_cipher.js:49:15)\n at async _asyncQueueExecutor (/app/node_modules/@whiskeysockets/baileys/WASignalGroup/queue_job.js:20:29)" }, "msg": "failed to decrypt message" }

@dcpenteado
Copy link

Same.

@ramon-victor
Copy link

Same

@CSFelix
Copy link

CSFelix commented Jul 16, 2024

+1

@Xrazik1
Copy link

Xrazik1 commented Jul 17, 2024

Same @PurpShell

@juliancesar
Copy link

Same

@postguruji
Copy link

+1

1 similar comment
@NiraKain
Copy link

+1

@PurpShell
Copy link
Collaborator

Hey! The session is missing from your auth state. I hope all of you describe your auth state (multi-file, mysql etc.)

I am working behind the scenes on a revamp to the auth key storage situation since they are getting lost it seems

@sejator
Copy link

sejator commented Jul 31, 2024

Hey! The session is missing from your auth state. I hope all of you describe your auth state (multi-file, mysql etc.)

I am working behind the scenes on a revamp to the auth key storage situation since they are getting lost it seems

I use mysql.

@natanjborba
Copy link

+1 I use MySQL

@Araxeus
Copy link

Araxeus commented Aug 8, 2024

Experiencing this with MongoDB

@DanNisenson
Copy link

Same, using SQL

@CodexRaunak
Copy link

Same with MongoDb

@lucianodltec
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests