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

network error

Open Apang-L opened this issue 2 years ago • 11 comments

the code that reproduces this issue or a replay of the bug

我这边 curl www.google 是可以的。说明代理没问题 image 但是当我执行 npx tsx .\example\info.ts 的时候他就会 connect timeout . image

Describe the bug

Describe the bug A clear and concise description of what the bug is.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

error log

d:\Project\VSCode\midjourney-api\node_modules\node-fetch\src\index.js:108 reject(new FetchError(request to ${request.url} failed, reason: ${error.message}, 'system', error)); ^

FetchError: request to https://discord.com/api/v9/channels/1130175529413267486/application-commands/search?type=1&query=settings&limit=1&include_applications=true failed, reason: connect ETIMEDOUT 199.96.62.17:443 at ClientRequest. (d:\Project\VSCode\midjourney-api\node_modules\node-fetch\src\index.js:108:11) at ClientRequest.emit (node:events:513:28) at ClientRequest.emit (node:domain:489:12) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at TLSSocket.emit (node:domain:489:12) 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' }

Apang-L avatar Aug 01 '23 07:08 Apang-L

代理设置全局模式或者增强模式 你只是浏览器启用了代理吧
或者参考这个 https://github.com/erictik/midjourney-discord/blob/main/examples/proxy.ts

zcpua avatar Aug 04 '23 02:08 zcpua

我也是这样,香港的服务器,偶尔成功偶尔不行

webpon avatar Aug 04 '23 03:08 webpon

然后我ping discord.com,偶尔成功偶尔失败,不知道是不是这个原因

webpon avatar Aug 04 '23 03:08 webpon

代码没动过,之前一直很稳定

webpon avatar Aug 04 '23 03:08 webpon

香港和国内的待遇差不多了 别香港了

zcpua avatar Aug 04 '23 03:08 zcpua

那我换美国服务器试下

webpon avatar Aug 04 '23 04:08 webpon

我一直用的日本的vpn

Apang-L avatar Aug 04 '23 07:08 Apang-L

还真是服务器的问题,换美国服务器就行了

webpon avatar Aug 04 '23 10:08 webpon

换了新加坡的服务器,图片偶尔失败,mj有出图,没捕获到

webpon avatar Aug 05 '23 15:08 webpon

然后我ping discord.com,偶尔成功偶尔失败,不知道是不是这个原因

您好,请问您用的是什么代理,是设置成全局模式下使用proxy.ts可以使用吗,我使用的clash无法解决这个问题

yoko2001 avatar Aug 23 '23 11:08 yoko2001

然后我ping discord.com,偶尔成功偶尔失败,不知道是不是这个原因

您好,请问您用的是什么代理,是设置成全局模式下使用proxy.ts可以使用吗,我使用的clash无法解决这个问题

clash pro 增强模式

zcpua avatar Aug 24 '23 03:08 zcpua