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

WebSocketException: Connection to was not upgraded to websocket #401

Open
pnkmem429 opened this issue Dec 2, 2024 · 4 comments
Open

WebSocketException: Connection to was not upgraded to websocket #401

pnkmem429 opened this issue Dec 2, 2024 · 4 comments

Comments

@pnkmem429
Copy link

E/flutter (15940): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: WebSocketException: Connection to 'http://abcd.com:0/ws/#' was not upgraded to websocket
E/flutter (15940): #0      _WebSocketImpl.connect (dart:_http/websocket_impl.dart:1011:41)
E/flutter (15940): #1      WebSocket.connect (dart:_http/websocket.dart:320:22)
E/flutter (15940): #2      new IOWebSocketChannel.connect (package:web_socket_channel/io.dart:81:28)
E/flutter (15940): #3      connect (package:web_socket_channel/src/_connect_io.dart:15:24)
E/flutter (15940): #4      new WebSocketChannel.connect (package:web_socket_channel/src/channel.dart:115:16)
E/flutter (15940): #5      new WebSocketProvider (package:m2_ua/data/provider/base/data_provider.dart:15:33)
E/flutter (15940): #6      new RecordPerformProvider (package:m2_ua/data/provider/record_perform_provider.dart)
E/flutter (15940): #7      RecordPerformRepository.insertSet (package:m2_ua/data/repository/record_perform_repository.dart:51:20)
E/flutter (15940): #8      HMIController.savePerformSet (package:m2_ua/feature/hmi/main/hmi_view_model.dart:621:49)
E/flutter (15940): #9      HMIController.savePerform (package:m2_ua/feature/hmi/main/hmi_view_model.dart:535:11)
E/flutter (15940): <asynchronous suspension>
E/flutter (15940): 
I/flutter (15940):     ------------------------[WebSocket: onError]----------------------------
I/flutter (15940):     WebSocketChannelException: WebSocketChannelException: WebSocketException: Connection to 'http://abcd.com:0/ws/#' was not upgraded to websocket
I/flutter (15940):     

I was using well until last Friday, but today, suddenly these error logs come out everywhere.

@1FarZ1
Copy link

1FarZ1 commented Dec 4, 2024

hey i got the same issue , any fixes ?

@jumperchen
Copy link
Member

We didn't change this library recently. Any other information for us to identify this issue?

@yajatkaul
Copy link

i have the same issue some say it is because of different server and client socket versions some just ask me to add
<application android:usesCleartextTraffic="true"/>
but nothing works kindly look into it

my express server is using socket.io v^4.8.1 and my flutter app is using v^3.0.2

@yajatkaul
Copy link

Okay i checked again found it to be a server side issue plugin seems to be fine

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

4 participants