Skip to content

[BUG] Timed out reading data from server #895

@dnl4

Description

@dnl4

Welcome!

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

What did you do?

Notei que quando vamos enviar 3 ou mais arquivos, dependendo do tamanho do arquivo, aparece o erro "Timed out reading data from server".

Isso ocorre porque o chatwoot tem um timeout pro webhook de 5 segundos Link para o código do chatwoot.

Do lado do evolution, notei que isso é causado basicamente por 2 delays existentes no código:

public async receiveWebhook(instance: InstanceDto, body: any) {
try {
await new Promise((resolve) => setTimeout(resolve, 500));

What did you expect?

Enviar os anexos.

What did you observe instead of what you expected?

O chatwoot ficou com uma mensagem vermelha, porém mesmo com a mensagem de erro, a mensagem chegou até o contato.

Screenshots/Videos

Captura de Tela 2024-09-18 às 22 45 35
Captura de Tela 2024-09-18 às 22 47 08
Captura de Tela 2024-09-18 às 22 47 21
Captura de Tela 2024-09-18 às 22 48 39

Which version of the API are you using?

v2.1.0

What is your environment?

Docker

Other environment specifications

No response

If applicable, paste the log output

sidekiq-1 | W, [2024-09-19T01:47:18.816076 #1] WARN -- : [ActiveJob] [WebhookJob] [90e945d8-1f33-45a1-a6c5-ab562111b4d7] Exception: Invalid webhook URL http://xxxxxxxxx.com/chatwoot/webhook/nome_da_instancia : Timed out reading data from server

Additional Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions