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

Envio de WEBHOOK com FALHA ('ChannelStartupService.sendDataWebhook-local')

Open lRafaelOliveira opened this issue 6 months ago • 0 comments

Welcome!

  • [X] Yes, I have searched for similar issues on GitHub and found none.

What did you do?

sempre que é necessario fazer o disparo do webHook, acontece esse erro:

2024-08-21 21:30:16 { 2024-08-21 21:30:16 local: 'ChannelStartupService.sendDataWebhook-local', 2024-08-21 21:30:16 message: '', 2024-08-21 21:30:16 hostName: undefined, 2024-08-21 21:30:16 syscall: undefined, 2024-08-21 21:30:16 code: 'ECONNREFUSED', 2024-08-21 21:30:16 error: undefined, 2024-08-21 21:30:16 stack: 'AggregateError\n' + 2024-08-21 21:30:16 ' at AxiosError.from (/evolution/node_modules/axios/dist/node/axios.cjs:873:14)\n' + 2024-08-21 21:30:16 ' at RedirectableRequest.handleRequestError(/evolution/node_modules/axios/dist/node/axios.cjs:3152:25)\n' + 2024-08-21 21:30:16 ' at RedirectableRequest.emit (node:events:519:28)\n' + 2024-08-21 21:30:16 ' at eventHandlers. (/evolution/node_modules/follow-redirects/index.js:38:24)\n' + 2024-08-21 21:30:16 ' at ClientRequest.emit (node:events:519:28)\n' + 2024-08-21 21:30:16 ' at Socket.socketErrorListener (node:_http_client:500:9)\n' + 2024-08-21 21:30:16 ' at Socket.emit (node:events:519:28)\n' + 2024-08-21 21:30:16 ' at emitErrorNT (node:internal/streams/destroy:169:8)\n' + 2024-08-21 21:30:16 ' at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' + 2024-08-21 21:30:16 ' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' + 2024-08-21 21:30:16 ' at Axios.request (/evolution/node_modules/axios/dist/node/axios.cjs:4262:41)\n' + 2024-08-21 21:30:16 ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', 2024-08-21 21:30:16 name: 'AggregateError', 2024-08-21 21:30:16 url: 'http://localhost:9002/evolution-api/new-message/19175ba9ae4d45f640f', 2024-08-21 21:30:16 server_url: 'http://localhost:9004' 2024-08-21 21:30:16 }

Eu iniciei com docker-compose, abri o manager, criei a instancia, conectei com o meu WhatsApp no celular, e entao aparece o erro ja, se eu mandar msg, ou receber mensagem... nenhum webhook é disparado..

Observei que isso só acontece se minha URL do webHook for "localhost". Testei Utilizando um dsn na minha maquina local (configurando meu arquivo host) e tbm testei utilizando o https://webhook.cool/ em ambos funcionou normalmente.

What did you expect?

Eu Esperava receber os webhooks das acoes, novas mensagens etc...

What did you observe instead of what you expected?

que nao recebi nenhum WebHook

Screenshots/Videos

image image

Which version of the API are you using?

2.1.0

What is your environment?

Windows

Other environment specifications

Nitro5 com i7 12º geracao, 16gb de ram, placa de video Geforce 3050...

Estou rodando em um docker no windows

If applicable, paste the log output

2024-08-21 21:35:41 2024-08-21 21:35:41 [Evolution API] [19175ba9ae4d45f640f] v2.0.9-rc 149 - Wed Aug 21 2024 21:35:41 ERROR [ChannelStartupService] [object]
2024-08-21 21:35:41 { 2024-08-21 21:35:41 local: 'ChannelStartupService.sendDataWebhook-local', 2024-08-21 21:35:41 message: '', 2024-08-21 21:35:41 hostName: undefined, 2024-08-21 21:35:41 syscall: undefined, 2024-08-21 21:35:41 code: 'ECONNREFUSED', 2024-08-21 21:35:41 error: undefined, 2024-08-21 21:35:41 stack: 'AggregateError\n' + 2024-08-21 21:35:41 ' at AxiosError.from (/evolution/node_modules/axios/dist/node/axios.cjs:873:14)\n' + 2024-08-21 21:35:41 ' at RedirectableRequest.handleRequestError (/evolution/node_modules/axios/dist/node/axios.cjs:3152:25)\n' + 2024-08-21 21:35:41 ' at RedirectableRequest.emit (node:events:519:28)\n' + 2024-08-21 21:35:41 ' at eventHandlers. (/evolution/node_modules/follow-redirects/index.js:38:24)\n' + 2024-08-21 21:35:41 ' at ClientRequest.emit (node:events:519:28)\n' + 2024-08-21 21:35:41 ' at Socket.socketErrorListener (node:_http_client:500:9)\n' + 2024-08-21 21:35:41 ' at Socket.emit (node:events:519:28)\n' + 2024-08-21 21:35:41 ' at emitErrorNT (node:internal/streams/destroy:169:8)\n' + 2024-08-21 21:35:41 ' at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' + 2024-08-21 21:35:41 ' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' + 2024-08-21 21:35:41 ' at Axios.request (/evolution/node_modules/axios/dist/node/axios.cjs:4262:41)\n' + 2024-08-21 21:35:41 ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', 2024-08-21 21:35:41 name: 'AggregateError', 2024-08-21 21:35:41 url: 'http://localhost:9002/evolution-api/new-message/19175ba9ae4d45f640f', 2024-08-21 21:35:41 server_url: 'http://localhost:9004' 2024-08-21 21:35:41 } 2024-08-21 21:35:41

Additional Notes

Observei que isso só acontece se minha URL do webHook for "localhost". Testei Utilizando um dsn na minha maquina local (configurando meu arquivo host) e tbm testei utilizando o https://webhook.cool/ em ambos funcionou normalmente.

lRafaelOliveira avatar Aug 22 '24 00:08 lRafaelOliveira