rikulo / socket.io-client-dart

socket.io-client-dart: Dartlang port of socket.io-client https://github.com/socketio/socket.io-client
https://quire.io
MIT License
675 stars 185 forks source link

WebSocketException: Connection to 'APIURL:0/socket.io/?EIO=4&transport=websocket#' was not upgraded to websocket #377

Closed talha-veroke closed 4 months ago

talha-veroke commented 7 months ago

Having this issue, While using this package.

IO.Socket socket = IO.io( APIConfiguration.SocketUrl, OptionBuilder() .setTransports(['websocket']) .disableAutoConnect() .setReconnectionAttempts(2) .setExtraHeaders({ 'access_token': await StorageService().readString(Keys.Auth_Token), }) .build(), ); socket.connect(); socket.onConnect((data) => print('connected')); socket.onConnectError((data) => print('error $data'));

Abdulah-butt commented 7 months ago

getting same issue. Did you get it?

LeandreBl commented 6 months ago

If you really want to access "APIURL:0/socket.io/?EIO=4&transport=websocket#", then you have a problem somewhere, as "0" is not a valid port, it might be the problem here.

ROD-MASAMI commented 6 months ago

i have the same problem i used my server_Url without specifiying any port but the package appended the ':0/socket.io/' how do i remove that i tried specifying the port in my url but it doesnt change

talha-veroke commented 4 months ago

My issue was resolved, it was some configuration issue on server side and our devops team resolved it.