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

[EN] unable to reply in WhatsApp group chats

Open patrickmau opened this issue 1 year ago • 5 comments

Bem-vido!

  • [x] Sim, pesquisei problemas semelhantes no GitHub e não encontrei nenhum.

O que você fez?

I am using Chatwoot + Evolution API to send and receive message on my dedicated WhatsApp number.

As of yesterday, I am unable to post any chat replies into WhatsApp group chats, regardless if they have been created recently or a long time ago. Previously I was able to send messages into group chats if they were created recently, but not existing groups that were more than one month old.

O que você esperava?

For chat messages to be posted as usual.

O que vc observou ao invés do que esperava?

All messages to group chats fail with the above "The message could not be sent. Please check your connection. [object Object]" error.

Sending messages to contacts directly works fine, only group chats are affected by this.

Capturas de Tela/Vídeos

Image

Image

Image

Qual versão da API você está usando?

Server: Ubuntu 24.04 LTS Chatwoot: v4.1.0 Evolution Api: 2.2.3

docker-compose.yaml

services:
  api:
    container_name: evolution_api
    image: atendai/evolution-api:latest
    restart: always
    depends_on:
      - redis
      - postgres
    ports:
      - 8080:8080
    volumes:
      - evolution_instances:/evolution/instances
    networks:
      - evolution-net
    env_file:
      - .env
    expose:
      - 8080
    extra_hosts:
      - "host.docker.internal:host-gateway"

  redis:
    image: redis:latest
    networks:
      - evolution-net
    container_name: redis
    command: >
      redis-server --port 6379 --appendonly yes
    volumes:
      - evolution_redis:/data
    ports:
      - 6379
    extra_hosts:
      - "host.docker.internal:host-gateway"
  postgres:
    container_name: postgres
    image: postgres:15
    networks:
      - evolution-net
    command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
    restart: always
    ports:
      - 5468:5432
    environment:
      - POSTGRES_USER=userid
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=evolution
      - POSTGRES_HOST_AUTH_METHOD=trust
    volumes:
      - postgres_data:/var/lib/postgresql/data


volumes:
  evolution_instances:
  evolution_redis:
  postgres_data:


networks:
  evolution-net:
    name: evolution-net
    driver: bridge

Qual é o seu ambiente?

LAMP setup running Ubuntu 24.04 LTS

Outras expecificações do ambiente

PHP 8.2.28

Se aplicável, cole a saída do log

[Evolution API]    v2.2.3  170   -  Sat May 24 2025 04:10:18     VERBOSE   [CacheEngine]  [string]  RedisCache initialized for Re 
[Evolution API]    v2.2.3  170   -  Sat May 24 2025 04:10:18     VERBOSE   [CacheService]  [string]  cacheservice created using cache engine: Gt 
[Evolution API]  [Chatwoot]  v2.2.3  170   -  Sat May 24 2025 04:10:19     VERBOSE   [ChannelStartupService]  [string]  Sending message to [email protected] 
[Evolution API]  [Chatwoot]  v2.2.3  170   -  Sat May 24 2025 04:10:19     VERBOSE   [ChannelStartupService]  [string]  Typing for 1200ms to [email protected] 
Cache request for group: [email protected]
[Evolution API]  [Chatwoot]  v2.2.3  170   -  Sat May 24 2025 04:10:21     VERBOSE   [ChannelStartupService]  [string]  Updating cache for group: [email protected] 
Cache request for group: [email protected]
[Evolution API]    v2.2.3  170   -  Sat May 24 2025 04:10:23     VERBOSE   [CacheEngine]  [string]  RedisCache initialized for Re 
[Evolution API]    v2.2.3  170   -  Sat May 24 2025 04:10:23     VERBOSE   [CacheService]  [string]  cacheservice created using cache engine: Gt 
[Evolution API]  [Chatwoot]  v2.2.3  170   -  Sat May 24 2025 04:10:24     ERROR   [ChannelStartupService]  [object]   
SessionError: No sessions
    at 260601586708638.1 [as awaitable] (/evolution/node_modules/libsignal/src/session_cipher.js:71:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _asyncQueueExecutor (/evolution/node_modules/libsignal/src/queue_job.js:20:29) 

[Evolution API]    v2.2.3  170   -  Sat May 24 2025 04:10:24     VERBOSE   [ChatwootService]  [string]  onSendMessageError {"status":400,"error":"Bad Request","message":["SessionError: No sessions"]} 
[Evolution API]    v2.2.3  170   -  Sat May 24 2025 04:10:24     ERROR   [ChatwootService]  [object]   
{
  status: 400,
  error: 'Bad Request',
  message: [ 'SessionError: No sessions' ]
} 

Notas Adicionais

Evolution API .env file:

# Whatsapp Web version for baileys channel
# https://web.whatsapp.com/check-update?version=0&platform=web

# WORKING
CONFIG_SESSION_PHONE_VERSION=2.3000.1023123818
# CONFIG_SESSION_PHONE_VERSION=2.3000.1022331021

# NOT WORKING
# CONFIG_SESSION_PHONE_VERSION=2.3000.1019707846
# CONFIG_SESSION_PHONE_VERSION=2.2413.51

patrickmau avatar May 24 '25 07:05 patrickmau

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

evolution-api after some of the latest versions that have fixed the banning problem by message in groups, despite this there is still a performance problem when sending messages to groups, making the operation very precarious. Suggestion is to look for another library if your focus is to work with groups. I will be closing the issue because this is a known problem. Until the Baileys dependency fixes this problem there is nothing to do.

dpaes avatar May 27 '25 11:05 dpaes

Thank you very much for the insights, appreciate you taking the time to reply. If anyone has any recommendations on APIs that work well with group chats, I would much appreciate a short reply.

Thank you everyone!

patrickmau avatar May 30 '25 04:05 patrickmau

Hope do you upgrade Bailey's from evolution api docker container?

yewkay avatar Jun 07 '25 05:06 yewkay