socket.io-client-dart icon indicating copy to clipboard operation
socket.io-client-dart copied to clipboard

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

Open tungbnt opened this issue 2 years ago • 8 comments

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

tungbnt avatar Aug 01 '23 09:08 tungbnt

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

Nabinda avatar Aug 02 '23 09:08 Nabinda

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

AbdelrahmanElghoul avatar Aug 14 '23 14:08 AbdelrahmanElghoul

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

also setPath is also not working

Kaizodo avatar Sep 25 '23 07:09 Kaizodo

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

Lele5353 avatar Sep 27 '23 08:09 Lele5353

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 avatar Oct 14 '23 11:10 jumperchen

FYI Here is the solution: https://github.com/rikulo/socket.io-client-dart/issues/319

jumperchen avatar Oct 14 '23 11:10 jumperchen

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 avatar Dec 19 '23 08:12 alexykuan

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

alexykuan avatar Dec 19 '23 10:12 alexykuan