Chanzhaoyu / chatgpt-web

用 Express 和 Vue3 搭建的 ChatGPT 演示网页
MIT License
30.94k stars 11.2k forks source link

TLS problem from 2024 #2051

Closed libowen9003 closed 3 months ago

libowen9003 commented 3 months ago

from 2024 I always get the error: FetchError: request to https://api.openai.com/v1/chat/completions failed, reason: Client network socket disconnected before secure TLS connection was established I use clash as the proxy, and set: HTTPS_PROXY=http:127.0.0.1:7890 in the .env file

before 2023 there's no problem using it.

cbug404 commented 3 months ago

https://github.com/Chanzhaoyu/chatgpt-web/issues/2039

libowen9003 commented 3 months ago

This error became constant since last week. Looks like https://api.openai.com/v1/chat/completions requires TLS1.3 now and node-fetch cannot get through:

FetchError: request to https://api.openai.com/v1/chat/completions failed, reason: Client network socket disconnected before secure TLS connection was established
    at ClientRequest.<anonymous> (/root/chatgpt-web/service/node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:525:35)
    at ClientRequest.emit (node:domain:489:12)
    at TLSSocket.socketErrorListener (node:_http_client:502:9)
    at TLSSocket.emit (node:events:525:35)
    at TLSSocket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  erroredSysCall: undefined
}

Is there anyone who has the same issue?

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 10 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 2 days since being marked as stale.