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

Message ain't receiving in some, if the group is not active for 1 or 2 hrs #1146

Open
7thRA-ONE opened this issue Nov 25, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@7thRA-ONE
Copy link


Bug Report: Bot Becomes Unresponsive in Inactive Groups

Description

The bot, built using Baileys v6.7.8, becomes unresponsive in WhatsApp groups that have been inactive for 1-2 hours. This issue is resolved only after restarting the bot. It appears to be related to socket management or connection stability during prolonged group inactivity.


Environment Details

Baileys Version: 6.7.8

Node.js Version: 20

Operating System: Linux (inside a Docker container)

Environment: Dockerized application


Socket Configuration

const connectionOptions = {
version: version, // [2, 3000, 1015901307]
logger: Pino({
level: 'silent',
}),
printQRInTerminal: true,
browser: Browsers.ubuntu("Chrome") || ["Ubuntu", "Edge", "110.0.1587.56"] || Browsers.macOS("Safari"),
auth: {
creds: state.creds,
keys: makeCacheableSignalKeyStore(state.keys, pino({ level: "fatal" }).child({ level: "fatal" })),
},
markOnlineOnConnect: true,
generateHighQualityLinkPreview: true,
getMessage: async (key) => {
let jid = jidNormalizedUser(key.remoteJid);
let msg = await store.loadMessage(jid, key.id);
return msg?.message || '';
},
msgRetryCounterCache,
defaultQueryTimeoutMs: undefined,
};


Any solution?

@7thRA-ONE 7thRA-ONE added the bug Something isn't working label Nov 25, 2024
@7thRA-ONE 7thRA-ONE changed the title Message ain't receiving in some, if the group is not active for 1 or to hrs Message ain't receiving in some, if the group is not active for 1 or 2 hrs Nov 25, 2024
@Kepron
Copy link

Kepron commented Nov 26, 2024

I don't know if this is the error, but I am experiencing a similar situation. Some messages are sent, while others are not. There is no error message either.

sock = makeWASocket({
    version,
    printQRInTerminal: !usePairingCode,
    auth: {
      creds: state.creds,
      keys: makeCacheableSignalKeyStore(
        state.keys,
        pino().child({ level: "fatal", stream: "store" })
      ),
    },
    mobile: useMobile,
    logger: pino({ level: "fatal" }),
    browser: ["Chrome (Linux)", "", ""],
    msgRetryCounterCache,
    connectTimeoutMs: 60000,
    defaultQueryTimeoutMs: undefined,
    generateHighQualityLinkPreview: true,
    syncFullHistory: false,
    markOnlineOnConnect: true,
  });

@bentacos
Copy link

the latest version is v6.7.9, test that first before posting an issue here

@Kepron
Copy link

Kepron commented Nov 27, 2024

the latest version is v6.7.9, test that first before posting an issue here

I already use 6.7.9

{
  "name": "wpapp",
  "version": "0.1",
  "description": "whatsapp bot",
  "private": true,
  "main": "index.js",
  "type": "module",
  "scripts": {
    "start": "node index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "@hapi/boom": "^10.0.1",
    "@whiskeysockets/baileys": "^6.7.9",
    "body-parser": "^1.20.2",
    "cors": "^2.8.5",
    "dotenv": "^16.4.5",
    "express": "^4.18.2",
    "express-fileupload": "^1.4.3",
    "jose": "^5.3.0",
    "node-cache": "^5.1.2",
    "pino": "^8.19.0",
    "qrcode-terminal": "^0.12.0",
    "readline": "^1.3.0"
  }
}

@7thRA-ONE
Copy link
Author

the latest version is v6.7.9, test that first before posting an issue here

6.7.9 is showing worse errors.
Like

Replying to old messages.
Ignoring messages.
Late reply to messages.
And on and on

@mrfzvx12
Copy link

sama problem, up

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

4 participants