-
Notifications
You must be signed in to change notification settings - Fork 109
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
WebSocketException: Connection not upgraded to websocket #321
Comments
Please check your server is opening first. |
My server in current up and running, I am able to create a websocket connection via the Postman client and a python script, but not Dart. |
Have you tried this way? I'm using WebSocketChannel.connect(wsUrl). |
Yes I have tried that before, it's work aswell. |
Any update on this? I'm currently facing this issue. |
@pnprogentec for socket connections use socket_io_client: ^2.0.3+1 im refactoring peerdart library with chaptgpt when it suggested to use web_socket_channel but this whole time I have been using socket_io_client example usage ``` void start(String id, String token) async {
}
|
Finally! After a week of research I finally found a working solution: I put this code into the Section of my Apache2 config:
While researching this I first found a working Nginx configuration which I then translated to Apache2. So if you have that problem with Nginx, you can use this here: This little NodeJS TCP Server helped me a lot with debugging the HTTP headers: https://riptutorial.com/node-js/example/22405/a-simple-tcp-server |
I am attempting to connect to a WebSocket API delivered via the AWS API gateway, currently, I am able to establish a successful connection via PostMan and Python scripts ran from my local terminal, but when I attempt a connection with dart I keep getting this error of
WebSocketException: Connection was not upgraded to websocket
My code
Error:
Any help on this will be much appreciated
The text was updated successfully, but these errors were encountered: