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

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

Open
1 task done
HerbertArthur opened this issue Jul 11, 2023 · 8 comments
Open
1 task done

Comments

@HerbertArthur
Copy link

Is there an existing issue for this?

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

What would your feature do ?

I had the same problem. #584

Logs:
Traceback (most recent call last): File "/Users/yehebin/work/baidu/personal-code/yehebin-tools/test/test_gpt.py", line 29, in <module> asyncio.run(main()) File "/Users/yehebin/program/miniforge3/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/Users/yehebin/program/miniforge3/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/Users/yehebin/work/baidu/personal-code/yehebin-tools/test/test_gpt.py", line 11, in main response = await bot.ask( File "/Users/yehebin/program/miniforge3/lib/python3.9/site-packages/EdgeGPT/EdgeGPT.py", line 116, in ask async for final, response in self.chat_hub.ask_stream( File "/Users/yehebin/program/miniforge3/lib/python3.9/site-packages/EdgeGPT/chathub.py", line 102, in ask_stream async with connect( File "/Users/yehebin/program/miniforge3/lib/python3.9/site-packages/websockets/legacy/client.py", line 637, in __aenter__ return await self File "/Users/yehebin/program/miniforge3/lib/python3.9/site-packages/websockets/legacy/client.py", line 655, in __await_impl_timeout__ return await self.__await_impl__() File "/Users/yehebin/program/miniforge3/lib/python3.9/site-packages/websockets/legacy/client.py", line 662, in __await_impl__ await protocol.handshake( File "/Users/yehebin/program/miniforge3/lib/python3.9/site-packages/websockets/legacy/client.py", line 329, in handshake raise InvalidStatusCode(status_code, response_headers) websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200

Proposed workflow

Null

Additional information

I already tried EdgeGPT 0.11.0 0.12.1, can't work.

My env:
OS: mac os
I access new bing by proxy, proxy works good. I can access new bing by browser.

@DrowskoytayhulGuider
Copy link

Do you use Clash. If you use it, you can try to install the Service Mode and then open TUN mode.

@xiahan4956
Copy link

I have used Clash. When I use it in my surface8,it works.
But when I use the tun mode in my surface5,it does't work....why....

@DrowskoytayhulGuider
Copy link

I have used Clash. When I use it in my surface8,it works. But when I use the tun mode in my surface5,it does't work....why....

Maybe you have to install the Service Mode first.

@xiahan4956
Copy link

I have used Clash. When I use it in my surface8,it works. But when I use the tun mode in my surface5,it does't work....why....

Maybe you have to install the Service Mode first.

You are right! Thanks very much

@HerbertArthur
Copy link
Author

I have used Clash. When I use it in my surface8,it works. But when I use the tun mode in my surface5,it does't work....why....

Maybe you have to install the Service Mode first.

You are right! Thanks very much

Yes, I am use Clash proxy tools. Open TUN mode does not work too.

@lovelf
Copy link

lovelf commented Jul 12, 2023

server rejected WebSocket connection, this is what problem

@XGY4n
Copy link

XGY4n commented Jul 14, 2023

Do you use Clash. If you use it, you can try to install the Service Mode and then open TUN mode.

thanks it's works for me !

@turbobin
Copy link

Do you use Clash. If you use it, you can try to install the Service Mode and then open TUN mode.

I use clash-linux-amd64-v1.13.0 in my centos system,how can I open TUN mode? I used to solve this problem by using proxychains,but now it suddenly doesn't work for me

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