EvolutionAPI / evolution-api

Evolution API is an open-source WhatsApp integration API
https://evolution-api.com
Other
1.93k stars 1.07k forks source link

Evolution 2.1.0 falha em recuperar mensagem. #903

Open admdanielspalma opened 1 month ago

admdanielspalma commented 1 month ago

Welcome!

What did you do?

Percebi que uma mensagem específica, oriunda de anúncio, não foi enviada via webhook. Ao investigar os logs, achei isso no momento do problema:

[Evolution API]  [VitoriaRibeiro]  v2.1.0  179   -  Fri Sep 20 2024 19:45:18   INFO   [ChannelStartupService]  [string]  Recovering message lost messageId: 3AA2C5D6A0CB6CAC50E0  [Evolution API]   v2.1.0  179   -  Fri Sep 20 2024 19:46:26   WARN   [ChatwootService]  [string]  no body message found  [Evolution API]  [AdmDanielSPalma]  v2.1.0  179   -  Fri Sep 20 2024 19:46:26   LOG   [ChannelStartupService]  [object]  

Destaque pra: Recovering message lost messageId: 3AA2C5D6A0CB6CAC50E0

Ao utilizar o endpoint fetch messages, todas as mensagens são retornadas menos essa. E ela está na conversa.

image

What did you expect?

Gostaria que a mensagem pudesse ser recuperada via fetch messages e também enviada via webhook quando chegasse.

What did you observe instead of what you expected?

A mensagem não foi recuperada e apareceu um erro no log referente a ela.

Screenshots/Videos

No response

Which version of the API are you using?

2.1.0

Testei utilizar o fetch messages na 2.1.1-homolog e não deu certo.

What is your environment?

Linux

Other environment specifications

Contabo VPS 2 - Ubuntu Server

If applicable, paste the log output

OBS: Log reescrito por IA censurando dados sensiveis de clientes:

{ local: 'p.sendData-Webhook', url: 'https://censurado.com.br/webhook/censurado', event: 'messages.upsert', instance: 'CensuradoInstance', data: { key: { remoteJid: '120363XXXXXX@censurado.us', fromMe: false, id: '16EA0BA666473BAEBF90D10595042AE3', participant: '55XXXXXXXXXX@s.whatsapp.net' }, pushName: 'Censurado | Consultor Financeiro', message: { senderKeyDistributionMessage: [SenderKeyDistributionMessage], messageContextInfo: [MessageContextInfo], reactionMessage: [ReactionMessage] }, contextInfo: undefined, messageType: 'reactionMessage', messageTimestamp: 1726872202, instanceId: '19d3f2ba-5e33-4077-868b-84c86916cfe7', source: 'android' }, destination: 'https://censurado.com.br/webhook/censurado', date_time: '2024-09-20T19:43:23.761Z', sender: '55XXXXXXXXXX@s.whatsapp.net', server_url: 'https://censurado.com.br', apikey: 'CENSURADO' }

[Evolution API] [CensuradoUser] v2.1.0 - Fri Sep 20 2024 19:45:18 INFO [ChannelStartupService] [string] Recovering message lost messageId: CENSURADO [Evolution API] v2.1.0 - Fri Sep 20 2024 19:46:26 WARN [ChatwootService] [string] no body message found [Evolution API] [CensuradoInstance] v2.1.0 - Fri Sep 20 2024 19:46:26 LOG [ChannelStartupService] [object]

{ key: { remoteJid: '120363XXXXXX@censurado.us', fromMe: false, id: '767C77E7CF44DCE335EDDA2BA3353D86', participant: '55XXXXXXXXXX@s.whatsapp.net' }, pushName: 'Censurado Marketing Digital', message: { senderKeyDistributionMessage: SenderKeyDistributionMessage { groupId: '120363XXXXXX@censurado.us', axolotlSenderKeyDistributionMessage: [Uint8Array] }, messageContextInfo: MessageContextInfo { deviceListMetadata: [DeviceListMetadata], deviceListMetadataVersion: 2 } }, contextInfo: undefined, messageType: 'unknown', messageTimestamp: 1726872385, instanceId: '19d3f2ba-5e33-4077-868b-84c86916cfe7', source: 'android' }

[Evolution API] v2.1.0 - Fri Sep 20 2024 19:46:26 LOG [p] [object]

{ local: 'p.sendData-Webhook', url: 'https://censurado.com.br/webhook/censurado', event: 'messages.upsert', instance: 'CensuradoInstance', data: { key: { remoteJid: '120363XXXXXX@censurado.us', fromMe: false, id: '767C77E7CF44DCE335EDDA2BA3353D86', participant: '55XXXXXXXXXX@s.whatsapp.net' }, pushName: 'Censurado Marketing Digital', message: { senderKeyDistributionMessage: [SenderKeyDistributionMessage], messageContextInfo: [MessageContextInfo] }, contextInfo: undefined, messageType: 'unknown', messageTimestamp: 1726872385, instanceId: '19d3f2ba-5e33-4077-868b-84c86916cfe7', source: 'android' }, destination: 'https://censurado.com.br/webhook/censurado', date_time: '2024-09-20T19:46:26.261Z', sender: '55XXXXXXXXXX@s.whatsapp.net', server_url: 'https://censurado.com.br', apikey: 'CENSURADO' }

Additional Notes

No response

admdanielspalma commented 1 month ago

Ah sim, importante notar que as mensagens oriundas de anúncios, em geral, são recebidas normalmente com todas as informações relevantes.