What happens
On the Meta Cloud API channel (whatsapp.business.service.ts), no MESSAGES_UPDATE webhook is ever
emitted for delivery statuses. Every sent / delivered / read callback from Meta is logged and then
lost:
ERROR [ChannelStartupService] TypeError: Cannot read properties of undefined (reading 'name')
at Ls.messageHandle (/evolution/dist/main.js:231:774)
at Ls.eventHandler (/evolution/dist/main.js:231:9623)
Three of these per outgoing message (one per ack). Incoming messages are unaffected.
Cause
messageHandle reads the push name before anything else:
https://github.com/EvolutionAPI/evolution-api/blob/2.3.7/src/api/integrations/channel/meta/whatsapp.business.service.ts#L390
if (received.contacts) pushName = received.contacts[0].profile.name;
This assumes contacts only ever appears on an incoming-message event, where the entry does carry
profile.name. Meta's status callback now also carries a contacts array — but without profile, only
the recipient identity (the user_id that comes along with pricing_model: "PMP" / recipient_user_id):
{
"messaging_product": "whatsapp",
"metadata": { "display_phone_number": "<redacted>", "phone_number_id": "<redacted>" },
"contacts": [ { "wa_id": "<redacted>", "user_id": "BR.<redacted>" } ],
"statuses": [
{
"id": "wamid.<redacted>",
"status": "delivered",
"timestamp": "1787583812",
"recipient_id": "<redacted>",
"recipient_user_id": "BR.<redacted>",
"pricing": { "billable": true, "pricing_model": "PMP", "category": "marketing", "type": "regular" }
}
]
}
So received.contacts[0].profile is undefined, and reading .name throws. The if (received.statuses)
block that would emit MESSAGES_UPDATE sits ~350 lines further down inside the same try, so it is never
reached; the catch only logs. pushName is not used on the status path at all.
main and 2.4.0-rc2 still have the same unguarded line.
Suggested fix
- if (received.contacts) pushName = received.contacts[0].profile.name;
+ if (received.contacts) pushName = received.contacts?.[0]?.profile?.name;
Happy to open a PR if that is welcome.
Steps to reproduce
- Meta Cloud API channel instance,
messages field subscribed in the Meta app, MESSAGES_UPDATE in the
instance webhook events, DATABASE_SAVE_DATA_NEW_MESSAGE=true.
- Send any message (template or plain text) through the instance.
- Meta posts the
sent / delivered / read callbacks; each one logs the TypeError above and no
MESSAGES_UPDATE webhook is delivered, nor is a MessageUpdate row written.
Environment
- Evolution API
2.3.7 (Docker image evoapicloud/evolution-api:v2.3.7), Postgres + Redis
- Channel: Meta Cloud API (WhatsApp Business Platform), Graph API official cloud
- Observed 2026-08-24
What happens
On the Meta Cloud API channel (
whatsapp.business.service.ts), noMESSAGES_UPDATEwebhook is everemitted for delivery statuses. Every
sent/delivered/readcallback from Meta is logged and thenlost:
Three of these per outgoing message (one per ack). Incoming messages are unaffected.
Cause
messageHandlereads the push name before anything else:https://github.com/EvolutionAPI/evolution-api/blob/2.3.7/src/api/integrations/channel/meta/whatsapp.business.service.ts#L390
This assumes
contactsonly ever appears on an incoming-message event, where the entry does carryprofile.name. Meta's status callback now also carries acontactsarray — but withoutprofile, onlythe recipient identity (the
user_idthat comes along withpricing_model: "PMP"/recipient_user_id):{ "messaging_product": "whatsapp", "metadata": { "display_phone_number": "<redacted>", "phone_number_id": "<redacted>" }, "contacts": [ { "wa_id": "<redacted>", "user_id": "BR.<redacted>" } ], "statuses": [ { "id": "wamid.<redacted>", "status": "delivered", "timestamp": "1787583812", "recipient_id": "<redacted>", "recipient_user_id": "BR.<redacted>", "pricing": { "billable": true, "pricing_model": "PMP", "category": "marketing", "type": "regular" } } ] }So
received.contacts[0].profileisundefined, and reading.namethrows. Theif (received.statuses)block that would emit
MESSAGES_UPDATEsits ~350 lines further down inside the sametry, so it is neverreached; the
catchonly logs.pushNameis not used on the status path at all.mainand2.4.0-rc2still have the same unguarded line.Suggested fix
Happy to open a PR if that is welcome.
Steps to reproduce
messagesfield subscribed in the Meta app,MESSAGES_UPDATEin theinstance webhook events,
DATABASE_SAVE_DATA_NEW_MESSAGE=true.sent/delivered/readcallbacks; each one logs theTypeErrorabove and noMESSAGES_UPDATEwebhook is delivered, nor is aMessageUpdaterow written.Environment
2.3.7(Docker imageevoapicloud/evolution-api:v2.3.7), Postgres + Redis