Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adonis js typescript server keep dying because of fetch #60

Closed
mtariqsajid opened this issue Feb 13, 2023 · 4 comments
Closed

adonis js typescript server keep dying because of fetch #60

mtariqsajid opened this issue Feb 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mtariqsajid
Copy link

mtariqsajid commented Feb 13, 2023

node version : 18.14.0
whatsapp-api-js : 0.8.2

the adonis 5 server keep dying because of fetch req is not closing
can you please tell me what should i do to resolve this error

TypeError: fetch failed
    at fetch (/home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/index.js:113:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (/home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/lib/core/connect.js:182:24)
      at /home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/lib/core/connect.js:129:46
      at Immediate._onImmediate (/home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/lib/core/connect.js:170:9)
      at processImmediate (node:internal/timers:466:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}
[22:48:07.069] FATAL (whatsapp-chatgpt/44690): "uncaughtException" detected
    TypeError: fetch failed
        at fetch (/home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/index.js:113:13)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
[22:48:07.069] WARN (whatsapp-chatgpt/44690): pino.final with prettyPrint does not support flushing

/home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/index.js:113
      Error.captureStackTrace(err, this)
            ^
TypeError: fetch failed
    at fetch (/home/expertscloud/js_projects/whatsapp-chatgpt/node_modules/undici/index.js:113:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[ warn ]  Underlying HTTP server died with "1 code"
@Secreto31126
Copy link
Owner

Hmm, I think the error is happening outside of the library, but maybe there's a correlation. May I get a snippet of your code to see how you are using it?

@Secreto31126
Copy link
Owner

Is, by any chance, your issue related to nodejs/undici#1531 ? Might be worth trying this setting

@Secreto31126 Secreto31126 added the bug Something isn't working label Feb 13, 2023
@mtariqsajid
Copy link
Author

I think you are right its related to node 18 DNS, I am now using node 16 let see if issue come up again

Is, by any chance, your issue related to nodejs/undici#1531 ? Might be worth trying this setting

@Secreto31126
Copy link
Owner

Closed as stale. Let me know if Node 16 did the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants