The solution to the frequent occurrence of Something Went Wrong when using Shadowsocks to access ChatGPT

Original link: https://www.codewoody.com/posts/55697/

Due to national conditions, we need to use various forms of proxies when using ChatGPT. At this time, we may find that the following errors may occur during the conversation with ChatGPT:

Something went wrong. If this issue persists please contact us through our help center at help.openai.com Something went wrong. If this issue persists please contact us through our help center at help.openai.com

This kind of error usually occurs when we ask the question again after leaving the webpage idle for a period of time (usually a minute). Of course, going to OpenAI’s help center will not find any useful information. If you search for this question, the best answer you can get is to refresh the page after this page appears, and then return to the dialog window to continue the conversation. But if the idle window appears again after refreshing, this problem will appear repeatedly, so you have to refresh the page repeatedly during the dialog, and every time the page is reloaded, you need to check the Cloudflare robot verification box, This will greatly slow down our speed and affect the product experience.

Could this problem be caused by my over-the-wall access? The firewall software I use is Shadowsocks. After some searching, a Github Issue discussion gave me inspiration.

Discussion address: https://github.com/shadowsocks/shadowsocks-libev/issues/2149 Discussion address: https://github.com/shadowsocks/shadowsocks-libev/issues/2149

Although the topic of discussion is not directly related to ChatGPT, this reply mentioned that when Shadowsocks builds a proxy pipeline, it will use Privoxy on the client side to convert the Socks5 proxy into an http proxy, which is then used by the browser. The configuration of Privoxy includes the control of Socket connection duration. So I checked the Privoxy configuration file used by my local Shadowsocks, which is located in /Users/lena/Library/Application Support/ShadowsocksX-NG/privoxy.config file in MacOS.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
twenty one
twenty two
twenty three
 toggle 1
enable-remote-toggle 1
enable-remote-http-toggle 1
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
forwarded-connect-retries 0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
socket-timeout 60

forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ .
forward [FE80::/64].
forward[::1] .
forward [FD00::/8] .
forward-socks5/127.0.0.1:1086 .

# Put user privoxy config line in this file.
# Ref: https://www.privoxy.org/user-manual/index.html

It can be seen that the timeout period set by the two options keep-alive-timeout and socket-timeout is relatively low. I did the following two attempts:

  1. Turned these two settings up, and restarted Shadowsocks, but then found that Privoxy reset the settings file;
  2. I manually killed the running Privoxy and manually started a new process with the updated config file, but it still didn’t solve the problem of Something went wrong;

So far, I don’t want to entangle with Privoxy. Since the problem lies in the link of converting Socks5 proxy to Http proxy, we can use Proxifier software to directly use the Socks5 proxy provided by Shadowsocks, which can solve this problem well.

There are many Proxifier tutorials on the Internet, so I won’t repeat them in this article.

This article is transferred from: https://www.codewoody.com/posts/55697/
This site is only for collection, and the copyright belongs to the original author.