Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectError: WebSocketException: Connection to 'https://admin.heartlinkdating.com:0/socket.io/?EIO=4&transport=websocket#' was not upgraded to websocket #340

Open
tungbnt opened this issue Aug 1, 2023 · 8 comments

Comments

@tungbnt
Copy link

tungbnt commented Aug 1, 2023

I have handled the server side of the port part is websocket and polling but still getting the error. Looking forward to your answers. Thanks

@Nabinda
Copy link

Nabinda commented Aug 2, 2023

I faced the same issue. Did you find any solutions regarding it

@AbdelrahmanElghoul
Copy link

facing the same issue. any update ? @Nabinda @tungbnt

@Kaizodo
Copy link

Kaizodo commented Sep 25, 2023

seems its adding port 0 on url https://admin.heartlinkdating.com:0 <---

also setPath is also not working

@Lele5353
Copy link

I faced the same issue. Did you find any solutions regarding it

@jumperchen
Copy link
Member

Most of the time, this issue is not caused by this library itself. Instead, it may be caused by a server configuration issue either on Nginx or Apache, or by a socket version difference between the server and the client.

@jumperchen
Copy link
Member

FYI Here is the solution: #319

@alexykuan
Copy link

Add extra HTTP-Header {'Upgrade': false} just solved my problem. Here's my sample code.

 socket = IO.io(
        server,
        IO.OptionBuilder()
            .enableAutoConnect()
            .enableForceNew()
            .setTransports(['websocket']).setExtraHeaders({'Upgrade': false}).build());

@alexykuan
Copy link

Add extra HTTP-Header {'Upgrade': false} just solved my problem. Here's my sample code.

 socket = IO.io(
        server,
        IO.OptionBuilder()
            .enableAutoConnect()
            .enableForceNew()
            .setTransports(['websocket']).setExtraHeaders({'Upgrade': false}).build());

socket_io_client: ^1.0.1

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

No branches or pull requests

7 participants