Open admdanielspalma opened 1 month ago
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:
[1m[34m[Evolution API][0m [1m[34m [VitoriaRibeiro] [1m[34m v2.1.0 [1m[34m 179 [0m [1m[34m - [1m[37m Fri Sep 20 2024 19:45:18 [0m [34m[44m[1m INFO [0m [33m[1m [ChannelStartupService][0m [34m[1m [string][0m [34m Recovering message lost messageId: 3AA2C5D6A0CB6CAC50E0 [0m [1m[33m[Evolution API][0m [1m[33m [1m[33m v2.1.0 [1m[33m 179 [0m [1m[33m - [1m[37m Fri Sep 20 2024 19:46:26 [0m [33m[43m[1m WARN [0m [33m[1m [ChatwootService][0m [33m[1m [string][0m [33m no body message found [0m [1m[32m[Evolution API][0m [1m[32m [AdmDanielSPalma] [1m[32m v2.1.0 [1m[32m 179 [0m [1m[32m - [1m[37m Fri Sep 20 2024 19:46:26 [0m [32m[42m[1m LOG [0m [33m[1m [ChannelStartupService][0m [32m[1m [object][0m [32m [0m
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.
Gostaria que a mensagem pudesse ser recuperada via fetch messages e também enviada via webhook quando chegasse.
A mensagem não foi recuperada e apareceu um erro no log referente a ela.
No response
2.1.0
Testei utilizar o fetch messages na 2.1.1-homolog e não deu certo.
Linux
Contabo VPS 2 - Ubuntu Server
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' }
Ah sim, importante notar que as mensagens oriundas de anúncios, em geral, são recebidas normalmente com todas as informações relevantes.
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:
[1m[34m[Evolution API][0m [1m[34m [VitoriaRibeiro] [1m[34m v2.1.0 [1m[34m 179 [0m [1m[34m - [1m[37m Fri Sep 20 2024 19:45:18 [0m [34m[44m[1m INFO [0m [33m[1m [ChannelStartupService][0m [34m[1m [string][0m [34m Recovering message lost messageId: 3AA2C5D6A0CB6CAC50E0 [0m [1m[33m[Evolution API][0m [1m[33m [1m[33m v2.1.0 [1m[33m 179 [0m [1m[33m - [1m[37m Fri Sep 20 2024 19:46:26 [0m [33m[43m[1m WARN [0m [33m[1m [ChatwootService][0m [33m[1m [string][0m [33m no body message found [0m [1m[32m[Evolution API][0m [1m[32m [AdmDanielSPalma] [1m[32m v2.1.0 [1m[32m 179 [0m [1m[32m - [1m[37m Fri Sep 20 2024 19:46:26 [0m [32m[42m[1m LOG [0m [33m[1m [ChannelStartupService][0m [32m[1m [object][0m [32m [0m
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.
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