whatsapp-http-api
whatsapp-http-api copied to clipboard
[BUG][NOWEB] - Internal server error - assertNodeErrorFree
Describe the bug
API returned internal server error only when using GET /groups When I use other sessions, it's working fine. Only just particular session has returned this kind of error. I don't have a clue what caused it.
Response for the error:
{
"statusCode": 500,
"timestamp": "2024-01-08T05:08:29.558Z",
"exception": {
"stack": "Error: internal-server-error\n at assertNodeErrorFree (/app/node_modules/@adiwajshing/baileys/lib/WABinary/generic-utils.js:56:15)\n at query (/app/node_modules/@adiwajshing/baileys/lib/Socket/socket.js:140:48)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.groupFetchAllParticipating (/app/node_modules/@adiwajshing/baileys/lib/Socket/groups.js:26:24)\n at async WhatsappSessionNoWebPlus.getGroups (/app/dist/core/session.noweb.core.js:247:16)\n at async /app/node_modules/@nestjs/core/router/router-execution-context.js:46:28\n at async /app/node_modules/@nestjs/core/router/router-proxy.js:9:17",
"message": "internal-server-error",
"data": 500,
"isBoom": true,
"isServer": true,
"output": {},
"name": "Error"
},
"request": {
"path": "/api/[session_id]/groups",
"method": "GET",
"body": {},
"query": {}
},
"version": {
"version": "2023.7.16",
"tier": "PLUS",
"browser": "/usr/bin/chromium"
}
}
To Reproduce Steps to reproduce the behavior:
GET /api/[session_id]/groups
Use any valid and working session
Expected behavior
Get list of joined groups
Engine I'm using NOWEB engine.
Hi! Could you try to restart the session or run it on a different container? Just to check that it's the session, not other errors. Also you can try to /logout, /stop and /start the session again to check that
Hi! Could you try to restart the session or run it on a different container? Just to check that it's the session, not other errors. Also you can try to /logout, /stop and /start the session again to check that
I have tried generate different session but still same for that phone number. My other phone numers are all fine. It's really weird.
I'm sorry I cannot run on different container.
@devlikepro do you have any idea for this? Based on the returned error, what do you can assume? Thanks.
@muhdazrain, I took a look at the bug and I suspect that the cause of the problem is on the side of @adiwajshing/baileys
. The cause would be this line. It's checking if the atrribute tag
is in the result
and I belive 'tag' is always there as it's an attribute of any object of type BinaryNode