evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

Request Timeout Error When sending to Whatsapp groups but not to individual accounts

Open musemby opened this issue 1 year ago • 8 comments

Welcome!

  • [x] Yes, I have searched for similar issues on GitHub and found none.

What did you do?

When I send messages to individual numbers, they succeed.

However sending to a group id that my bot is a member of fails with a timeout error.

What did you expect?

Expectation is a success message that is pending first e.g:

  key: MessageKey {
    remoteJid: '[email protected]',
    fromMe: true,
    id: '024E93C437F87241F176F42'
  },
  pushName: '',
  status: 'PENDING',
  message: { conversation: 'My message' },
  contextInfo: null,
  messageType: 'conversation',
  messageTimestamp: 1748250263,
  instanceId: 'aa09-df18-4b0b-bccc-',
  source: 'unknown'
} ```


Possibly a status update when the message is read:
```[
{
    "key": {
      "remoteJid": "[email protected]",
      "id": "3EB0CC615C9CB024E93C437F87241F1762BC6F42",
      "fromMe": true
    },
    "update": {
      "status": 3
    }
  }
] 

What did you observe instead of what you expected?

    at /evolution/node_modules/baileys/lib/Utils/generics.js:170:32 {
  data: {
    stack: 'Error\n' +
      '    at promiseTimeout (/evolution/node_modules/baileys/lib/Utils/generics.js:165:19)\n' +
      '    at waitForMessage (/evolution/node_modules/baileys/lib/Socket/socket.js:117:53)\n' +
      '    at query (/evolution/node_modules/baileys/lib/Socket/socket.js:139:22)\n' +
      '    at assertSessions (/evolution/node_modules/baileys/lib/Socket/messages-send.js:183:34)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
      '    at async /evolution/node_modules/baileys/lib/Socket/messages-send.js:352:21\n' +
      '    at async Object.transaction (/evolution/node_modules/baileys/lib/Utils/auth-utils.js:135:26)\n' +
      '    at async relayMessage (/evolution/node_modules/baileys/lib/Socket/messages-send.js:288:9)\n' +
      '    at async Object.sendMessage (/evolution/node_modules/baileys/lib/Socket/messages-send.js:711:17)\n' +
      '    at async Rs.sendMessage (/evolution/dist/main.js:239:7851)'
  },
  isBoom: true,
  isServer: false,
  output: {
    statusCode: 408,
    payload: {
      statusCode: 408,
      error: 'Request Time-out',
      message: 'Timed Out'
    },
    headers: {}
  }
} 

Screenshots/Videos

No response

Which version of the API are you using?

2.2.3

What is your environment?

Windows

Other environment specifications

docker container from atendai/evolution-api:latest

If applicable, paste the log output

No response

Additional Notes

No response

musemby avatar May 26 '25 09:05 musemby

Same here. Node was working fine until friday/saturday. 1-1 still works fine.

For groups I get error using n8n even with the sendpresence webhook:

"Error code

400

Full message

400 - "{"status":400,"error":"Bad Request","response":{"message":["TypeError: Cannot read properties of undefined (reading 'id')"]}}" Request

{ "body": { "number": "[email protected]", "delay": 11983, "presence": "composing" }, "headers": { "apikey": "YYYYYYYYYYYYY", "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/;q=0.9, image/;q=0.8, /;q=0.7" }, "method": "POST", "uri": "https://ZZZZZZ/chat/sendPresence/WWWWWWW", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 300000, "encoding": null, "json": false, "useStream": true } Other info Item Index

2

Node type

n8n-nodes-base.httpRequest

Node version

4.2 (Latest)

n8n version

1.79.3 (Self Hosted)

Time

26/05/2025, 09:55:44

Stack trace

NodeApiError: Bad request - please check your parameters at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:525:33) at processTicksAndRejections (node:internal/process/task_queues:95:5) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:627:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:878:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1211:20"

iqueroman avatar May 26 '25 13:05 iqueroman

same issue here

NathyG2524 avatar May 26 '25 17:05 NathyG2524

guys, before 2.2.2 or 2.2.3 baileys still with problems with groups, so we do not recommend use evolution api for groups message. If u wanna use only 1 to 1 works perfectly, but if ur focus is group, find another library

dpaes avatar May 27 '25 11:05 dpaes

I'm going to close this issue because this problem has been known for some versions after a problem with Baileys (dependency that connects to WhatsApp). There is nothing to report about it because it does not depend on Evolution but on the Baileys dependency.

dpaes avatar May 27 '25 11:05 dpaes

I remember that the problem had something to do with the group metadata or something like that.

piranhyak avatar May 28 '25 15:05 piranhyak

In the Baileys repo some claims to update to latest version fix the problem. Is there a way we can use some specific Baileys version in our instance (instead of waiting for a new Evo Api release)? Thanks!

dariogcode avatar May 30 '25 18:05 dariogcode

whats CONFIG_SESSION_PHONE_VERSION= ? same problem again...

caionorder avatar Oct 02 '25 14:10 caionorder

Hi, I'm facing the same problem: cannot send messages to groups (it shows the "No sessions" error). I've already asked Claude and made some changes, but it keeps failing. Although the messages to a direct number are ok, I'm still facing it.

FYI: I'm using Baileys (don't know which version) and:

CONFIG_SESSION_PHONE_VERSION=2.3000.1029878816 Evolution api version: latest

Is it really this Baileys bug?

sergiodmcosta86 avatar Oct 13 '25 14:10 sergiodmcosta86