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

Bug Report: Outgoing messages stuck in PENDING, never delivered (Evolution API 2.4.0, Baileys)

Open chimaras opened this issue 5 months ago • 34 comments

Bug Report: Outgoing messages stuck in PENDING, never delivered (Evolution API 2.4.0, Baileys)**

Evolution API version

2.4.0 (homolog tag), license activated successfully (community tier)

Database

PostgreSQL 15

Connection type

Baileys (WhatsApp Web)

What I did

Sent text messages via /message/sendText/{instance}, both from my own backend and directly from the Evolution Manager UI, to a real, active WhatsApp number that I personally control and actively monitor.

What happened

  • API call returns 200 OK with a valid messageId, status PENDING
  • Message never progresses past PENDING in Message.status
  • Message is never received on the destination phone (confirmed visually on the device, multiple times, over several hours)
  • This happens regardless of: client (own backend vs Manager UI directly), message content, or time of day

Database evidence

sqlSELECT status, COUNT(*) FROM "Message" WHERE "key"->>'fromMe'='true' GROUP BY status;Result: 74 PENDING, 1 READ, 1 SERVER_ACK — out of 76 total outbound messages since instance creation (June 18). This has been consistent since day one, not something that started recently.

Instance state

connectionState reports state: "open" consistently and stably — instance shows as connected.

Logs (evolution-api container)

Repeated, on every message send attempt:Closing session: SessionEntry { ... }On first pairing (once): a stream:error with code: "515", followed by an automatic full session restart (ChannelStartupService re-init).

Steps already taken (none resolved it)

  1. Full logout + re-scan QR from scratch — same behavior after reconnect
  2. Updated from 2.3.7 (latest) to 2.4.0 (homolog) + activated community license — same behavior
  3. Confirmed correct webhook config (was a separate, now-fixed issue: webhookByEvents: true was causing 404s on event-specific routes — fixed, unrelated to this delivery issue)
  4. Sent directly via Manager UI (bypassing my own backend entirely) — same PENDING-forever result
  5. Verified the receiving number is correct and active (confirmed visually on the device)

Possible related context

The conversation in question appears to use a WhatsApp @lid JID (remoteJid ending in @lid with remoteJidAlt as the real phone number) for inbound messages — possibly related to WhatsApp's newer privacy/multi-device addressing mode. I'm aware of the documented @lid onWhatsApp exists:false issue, but my outbound sends to the plain @s.whatsapp.net JID (the phone number) are equally stuck in PENDING, so I'm not certain this is the same root cause.

Question

Is PENDING-forever with no SERVER_ACK/DELIVERY_ACK a known symptom of something specific (rate limiting, account flagging, a particular WhatsApp Web version mismatch)? Is there a way to get more diagnostic detail on why a specific message never leaves PENDING (e.g. a stream-level error per message, not just connection-level)?

Happy to provide instance_id, full logs, or any other diagnostic info needed.

chimaras avatar Jun 23 '26 05:06 chimaras

I have the same problem here. The instances using Baileys are not sending. But the instnaces using Cloud API are working without problems. My version is 2.3.7

ronaldoone avatar Jun 23 '26 15:06 ronaldoone

I have the same problem.

Version: 2.3.7

marcelomess avatar Jun 24 '26 11:06 marcelomess

same here!

William-Otto avatar Jun 24 '26 14:06 William-Otto

Same here.any one found a solution?

kurotsuke avatar Jun 24 '26 19:06 kurotsuke

Same problem :/

Adilmar avatar Jun 24 '26 21:06 Adilmar

I faced the same issue yesterday. I removed all the WhatsApp numbers from the system and added them again. I have three WhatsApp accounts—two are working correctly, but one is still not working.

apatel131092 avatar Jun 25 '26 10:06 apatel131092

I'm having this problem too. I already deleted the instance, but nothing worked.

marcelmafra avatar Jun 25 '26 17:06 marcelmafra

I'm having the same problem with certain numbers in version 2.3.7, deleted the instance and tried again but it's the same.

emilio-kalificado avatar Jun 25 '26 18:06 emilio-kalificado

I'm having the same problem too. I try to delete and create new instances, but not working.

jolcinei avatar Jun 25 '26 18:06 jolcinei

It's the same situation over here. I've tried everything with mine, but nothing is working yet. My operations on Evolution are at a standstill. I'm looking for alternatives to get around this situation.

castleofvalak-max avatar Jun 27 '26 06:06 castleofvalak-max

Same here. Happened to me around 7 hours ago

crawdz-cpu avatar Jun 27 '26 16:06 crawdz-cpu

I also found that these PENDING messages are marked with an ERROR status in the MessageUpdate table. Nowhere I looked did I find any additional details for that ERROR.

SELECT key->>'id' AS "keyId", message->>'conversation' AS message, "statuses"
FROM evolution_api."Message" LEFT JOIN LATERAL (
	SELECT ARRAY_AGG("status") AS "statuses"
  	FROM evolution_api."MessageUpdate"
	WHERE "messageId"=evolution_api."Message"."id"
) sq ON TRUE
WHERE key->>'id'='AC3359F1C459D2476029105290E22E21' -- replace with target message

script1542 avatar Jun 29 '26 07:06 script1542

My friend has the same setup but he has no error

crawdz-cpu avatar Jun 29 '26 08:06 crawdz-cpu

Same here! version: 2.3.7

P1er0LC avatar Jun 29 '26 15:06 P1er0LC

It doesn’t just happen in Evolution API (Baileys), the same thing happens with whatsmeow. New WhatsApp update I think.

alexcendal avatar Jun 29 '26 15:06 alexcendal

My friend has the same setup but he has no error

Does it work with contacts you’ve never written to before?

alexcendal avatar Jun 29 '26 15:06 alexcendal

It's back to normal here; I just managed to send and receive messages with the other contact.

mayconcslopes-sketch avatar Jun 29 '26 18:06 mayconcslopes-sketch

Suddenly back to normal, and I am clueless why.

script1542 avatar Jul 01 '26 06:07 script1542

I am still experiencing it on a couple of instances

albedeployer avatar Jul 01 '26 14:07 albedeployer