discord / discord-example-app

Basic Discord app with examples
MIT License
515 stars 525 forks source link

connect ETIMEDOUT #28

Open 13476911603 opened 1 year ago

13476911603 commented 1 year ago

When I want to run the project, there is an error. I tried proxy, firewall, etc., but there is no solution. What are the possible reasons and solutions? FetchError: request to https://discord.com/api/v10/applications/1118079193654251581/commands failed, reason: connect ETIMEDOUT 162.159.136.232:443 at ClientRequest. (file:///D:/Users/Desktop/discord-example-app/node_modules/node-fetch/src/index.js:108:11) at ClientRequest.emit (node:events:525:35) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { type: 'system', errno: 'ETIMEDOUT', code: 'ETIMEDOUT', erroredSysCall: 'connect' }

huizm commented 10 months ago

Same here. It could be a problem specific to (mainland) Chinese network conditions. I have tried using proxy in Terminal but it seems have no use.

huizm commented 10 months ago

Hi! Here's how I fixed the problem.

This request does not follow the system proxy rules, so it wouldn't work even if you have enabled global proxy. You can turn on the TUN mode in the proxy software to take over these traffics and realize network card level global proxy.