Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

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

Closed
1 task done
IKDH opened this issue Jul 19, 2023 · 7 comments

Comments

@IKDH
Copy link

IKDH commented Jul 19, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

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
Copy link

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

@IKDH
Copy link
Author

IKDH commented Jul 21, 2023

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

@xuxin3101
Copy link
Contributor

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
Copy link

F33RNI commented Jul 23, 2023

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

@OlegRuban-ai
Copy link

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

xuxin3101 pushed a commit to xuxin3101/EdgeGPT that referenced this issue Jul 24, 2023
@xuxin3101
Copy link
Contributor

fixed
#627

@asmigulati
Copy link

Hi, I am still encountering the same error!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants