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] Closing stale open session for new outgoing prekey bundle / Closing session: SessionEntry #888

Open
oscarguindzberg opened this issue Jun 21, 2024 · 6 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:

Closing stale open session for new outgoing prekey bundle
Closing session: SessionEntry {
  _chains: {
    xxx: { chainKey: [Object], chainType: 1, messageKeys: {} }
  },
  registrationId: 149285497,
  currentRatchet: {
    ephemeralKeyPair: {
      pubKey: <Buffer xx xx xx ...>,
      privKey: <Buffer xx xx xx ...>
    },
    lastRemoteEphemeralKey: <Buffer xx xx xx ...>,
    previousCounter: 0,
    rootKey: <Buffer xx xx xx ...>
  },
  indexInfo: {
    baseKey: <Buffer xx xx xx ...>,
    baseKeyType: 1,
    closed: -1,
    used: xxx,
    created: 1718893928273,
    remoteIdentityKey: <Buffer xx xx xx ...>
  },
  pendingPreKey: {
    signedKeyId: 7192122,
    baseKey: <Buffer xx xx xx ...>,
    preKeyId: 1310
  }
}

I know this is printed by libsignal, I guess these lines are the culprits:

To Reproduce
Steps to reproduce the behavior:
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
Copy link
Contributor Author

oscarguindzberg commented Jun 21, 2024

These bugs may be related
#885
#886
#888

@SheIITear SheIITear closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2024
@oscarguindzberg
Copy link
Contributor Author

I don't understand why was the issue closed.

@PurpShell
Copy link
Collaborator

I don't understand why was the issue closed.

i think he closed due to duplicate

@PurpShell PurpShell reopened this Jul 3, 2024
@Anshuljai
Copy link

Any solution?

@DanNisenson
Copy link

Same, using SQL

@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

6 participants