Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WRONG_VERSION_NUMBER when I use wss instead of https #1510

Open
dungnc opened this issue Jul 17, 2021 · 5 comments
Open

WRONG_VERSION_NUMBER when I use wss instead of https #1510

dungnc opened this issue Jul 17, 2021 · 5 comments

Comments

@dungnc
Copy link

dungnc commented Jul 17, 2021

In my iOS swift is using Socket.IO-Client-Swift library and https://xxx.xxx.com.
In my Flutter project, I got unsupported https error so I change it to wss://xxx.xxx.com and I got this error:

'Dart Unhandled Exception: WebSocketChannelException: WebSocketChannelException: HandshakeException: Handshake error in client (OS Error:
WRONG_VERSION_NUMBER(tls_record.cc:242)), stack trace: #0 new IOWebSocketChannel._withoutSocket. (package:web_socket_channel/io.dart:98:24)
1 _invokeErrorHandler (dart:async/async_error.dart:45:24)
2 _HandleErrorStream._handleError (dart:async/stream_pipe.dart:272:9)
3 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:157:13)
4 _RootZone.runBinaryGuarded (dart:async/zone.dart:1558:10)
5 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:360:15)
6 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378:16)
7 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280:7)
8 _SyncStreamControllerDispatch._sendError (dart:async/stream_controller.dart:737:19)
9 _StreamController._addError (<…>'

@tvanhuu
Copy link

tvanhuu commented Oct 13, 2021

same issue. Please fix it..

@wpfchina
Copy link

wpfchina commented Feb 11, 2022

same issue. Please fix it..

[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: HandshakeException: Handshake error in client (OS Error:
WRONG_VERSION_NUMBER(tls_record.cc:242))
#0 _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:104:46)
#1604 _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:147:25)
dart-lang/web_socket_channel#2 _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:803:54)
dart-lang/web_socket_channel#3 _RawSecureSocket._closeHandler (dart:io/secure_socket.dart:796:15)
#1605 _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:739:9)
dart-lang/web_socket_channel#5 _rootRunUnary (dart:async/zone.dart:1442:13)
dart-lang/web_socket_channel#6 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
dart-lang/web_socket_channel#7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
dart-lang/web_socket_channel#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
dart-lang/web_socket_channel#9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
dart-lang/web_socket_channel#10 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
dart-lang/web_socket_channel#11 _StreamController._ad<…>

@xwzliang
Copy link

Same issue here. Does anyone know how to fix it?

@WiRight
Copy link

WiRight commented Dec 19, 2022

Same here.

But sometimes change wss to ws has save me. But this is the wrong solution

@belyaj
Copy link

belyaj commented Dec 21, 2023

I have the same problem

@mosuem mosuem transferred this issue from dart-lang/web_socket_channel Jan 22, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

7 participants