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
Connection to {MY_SOCKET_URL} was not upgraded to websocket #164
Comments
Same Issue |
I'm having the same iseue as well. Did you find out the root of cause? Thanks |
any solutions? |
This started popping up for me |
This looks like the server side is not upgrading the connection to a websocket. Stack Overflow is likely a better resource for specific implementation issues. You may need to post the specific request and response data to see what is going wrong. |
@natebosch I am facing the same issue as well, it works perfectly on postman so I doubt if it's from server-side, looks like a flutter specific issue as reported by many other devs: flutter/flutter#11444 |
From flutter/flutter#11444 (comment) and dart-lang/sdk#25120 it looks like it's most likely caused by a server that does not comply with the HTTP spec and the Dart SDK's behavior around lowercasing header names. I'm not sure if we have a workaround for this - @brianquinlan do you know of any way to force certain header casing with the It may be feasible to implement the socket upgrade code yourself, with whatever quirks of header casing necessary to appease the buggy server, and then use |
channel = IOWebSocketChannel.connect(Uri.encode(MY_SOCKET_URL));
I'm listening to this channel and the snapshot returns
WebSocketChannelException: WebSocketException: Connection to 'http://dev-system.worksamurai.com.au:0/api/websocket/messages/support?accessToken=oi+wBZblSq=&id=48#' was not upgraded to websocket
The text was updated successfully, but these errors were encountered: