acheong08 / EdgeGPT

Reverse engineered API of Microsoft's Bing Chat AI
The Unlicense
8.07k stars 909 forks source link

[Bug]: websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200 when I use the script on a server #621

Closed IKDH closed 1 year ago

IKDH commented 1 year ago

Is there an existing issue for this?

What happened?

When I use the script on a server, I have this error : websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200

When I use the same script with the same IP (I use a proxy) on my computer, I have no problem.

In both case, I don't use cookies.

Steps to reproduce the problem

  1. Go to ....a
  2. Press ....
  3. ...

What should have happened?

The script should work on a server.

Version where the problem happens

All

What Python version are you running this with?

3.9

What is your operating system ?

Linux

Command Line Arguments

No

Console logs

websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200

Additional information

No response

AISimplyExplained commented 1 year ago

I am facing the same problem when i run it on replit

IKDH commented 1 year ago

Does anyone has successfully run the program in cloud server like AWS ?

xuxin3101 commented 1 year ago

Perhaps a proxy is needed for the WSS connection (using Warp in a cloud server), but WebSockets don't support proxies. I switched to aiohttp, but encountered a new error: aiohttp.client_exceptions.ClientOSError: [Errno 104] Connection reset by peer. However, I'm confident that Warp can be used with Bing, as the project https://github.com/waylaidwanderer/node-chatgpt-api runs smoothly on the same cloud server.

F33RNI commented 1 year ago

Same. Versions after 0.10.16 do not work with proxies =(

OlegRuban-ai commented 1 year ago

The same problem, it starts locally, but doesn't work on a remote server

xuxin3101 commented 1 year ago

fixed https://github.com/acheong08/EdgeGPT/pull/627

asmigulati commented 1 year ago

Hi, I am still encountering the same error!