-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Welcome!
- Yes, I have searched for similar issues on GitHub and found none.
What did you do?
Eu utilizo Evolution API 2.3 e Chatwoot 4.1 e ja algum tempo estamos notando mensagens nas conversas no chatwoot que não tem relação com aquele cliente, então na ultima vez que encontrei recolhi o log da instancia da evolution e aconteceu o seguinte.
A mensagem foi tratada com o remotejid do cliente trocado, a mensagem chegou da meta com o remotejid correto, porem na hora de realizar o tratamento a evolution colocou a mensagem no remotejid de outro cliente.
segue log retirado da evolution da recepção da mensagem , só ocultei dados de clientes, mas acredito que é possivel notar que comparando o id WAMID recebido da mensagem da API da meta a que a Evolution tratou o remotejid não é o mesmo referente ao from
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [string] Contenido recibido en eventHandler:
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [string] {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "551xxxxxxx",
"phone_number_id": "698xxxxxxxxx"
},
"contacts": [
{
"profile": {
"name": "🌟"
},
"wa_id": "xxxx9576"
}
],
"messages": [
{
"from": "xxxx9576",
"id": "wamid.HBgNNTUxMTk5NzQ4OTU3NhUCABIYIEVCQkQ3NjI22dlotrG5jKBNDhEOTg5MEIxNUE4QzNBAA==",
"timestamp": "1755021194",
"text": {
"body": "8"
},
"type": "text"
}
]
}
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [string] Tipo de mensaje recibido: text
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [object]
{
key: {
id: 'wamid.HBgNNTUxMTk5NzQ4OTU3NhUCABIYIEVCQkQ3NjI22dlotrG5jKBNDhEOTg5MEIxNUE4QzNBAA==',
remoteJid: 'xxx04222@s.whatsapp.net',
fromMe: false
},
pushName: '🌟',
message: { conversation: '8' },
contextInfo: undefined,
messageType: 'conversation',
messageTimestamp: 1755021194,
source: 'unknown',
instanceId: 'xxxxxxxxxxxx'
}
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:16 VERBOSE [ChatwootService] [string] --- Start createConversation ---
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:16 VERBOSE [ChatwootService] [string] Instance: {"instanceName":"NomeInstancia","instanceId":"xxxxxxxxxxxx"}
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:16 VERBOSE [ChatwootService] [string] Found conversation to: xxx04222@s.whatsapp.net, conversation ID: 4681
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheEngine] [string] RedisCache initialized for Re
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheService] [string] cacheservice created using cache engine: Xt
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheEngine] [string] RedisCache initialized for Re
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheService] [string] cacheservice created using cache engine: Xt
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:18 VERBOSE [CacheEngine] [string] RedisCache initialized for Re
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:18 VERBOSE [CacheService] [string] cacheservice created using cache engine: Xt
What did you expect?
a entrega da mensagem no chatwoot seja realizada para o mesmo remetente recebido no json da API Cloud.
Conforme mostrado acima a mensagem foi recebida com um From e registrado com outro remoteJid na evolution e chatwoot
What did you observe instead of what you expected?
Que isso acontece não muito frequente , mas ocorre tanto com mensagens de texto como arquivos.
Screenshots/Videos
No response
Which version of the API are you using?
Evolution 2.3
What is your environment?
Windows
Other environment specifications
VPS 6 CPU e 12,5Gb RAM
If applicable, paste the log output
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [string] Contenido recibido en eventHandler:
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [string] {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "551xxxxxxx",
"phone_number_id": "698xxxxxxxxx"
},
"contacts": [
{
"profile": {
"name": "🌟"
},
"wa_id": "xxxx9576"
}
],
"messages": [
{
"from": "xxxx9576",
"id": "wamid.HBgNNTUxMTk5NzQ4OTU3NhUCABIYIEVCQkQ3NjI22dlotrG5jKBNDhEOTg5MEIxNUE4QzNBAA==",
"timestamp": "1755021194",
"text": {
"body": "8"
},
"type": "text"
}
]
}
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [string] Tipo de mensaje recibido: text
[Evolution API] [NomeInstancia] v2.3.0 199 - Tue Aug 12 2025 14:53:15 LOG [ChannelStartupService] [object]
{
key: {
id: 'wamid.HBgNNTUxMTk5NzQ4OTU3NhUCABIYIEVCQkQ3NjI22dlotrG5jKBNDhEOTg5MEIxNUE4QzNBAA==',
remoteJid: 'xxx04222@s.whatsapp.net',
fromMe: false
},
pushName: '🌟',
message: { conversation: '8' },
contextInfo: undefined,
messageType: 'conversation',
messageTimestamp: 1755021194,
source: 'unknown',
instanceId: 'xxxxxxxxxxxx'
}
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:16 VERBOSE [ChatwootService] [string] --- Start createConversation ---
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:16 VERBOSE [ChatwootService] [string] Instance: {"instanceName":"NomeInstancia","instanceId":"xxxxxxxxxxxx"}
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:16 VERBOSE [ChatwootService] [string] Found conversation to: xxx04222@s.whatsapp.net, conversation ID: 4681
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheEngine] [string] RedisCache initialized for Re
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheService] [string] cacheservice created using cache engine: Xt
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheEngine] [string] RedisCache initialized for Re
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:17 VERBOSE [CacheService] [string] cacheservice created using cache engine: Xt
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:18 VERBOSE [CacheEngine] [string] RedisCache initialized for Re
[Evolution API] v2.3.0 199 - Tue Aug 12 2025 14:53:18 VERBOSE [CacheService] [string] cacheservice created using cache engine: Xt
Additional Notes
Note no log que comparando o id wamid a mensagem esta sendo entregue para o remetente diferente do from recebido pela meta. O arquivo foi editado para não exibir dados reais do cliente, porem o log original está armazenado na minha maquina.