You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting HubConnection.
Starting connection with transfer format 'TransferFormat.text'.
Sending negotiation request: https://xyz..../chatHub/negotiate.
Selecting transport 'HttpTransportType.webSockets'.
(WebSockets transport) Connecting.
WebSocket connected to wss://xyz..../chatHub?id=QIB6TRwR-hTYB8cH9SOPRQ&access_token=eyJhbGciOiJIUzIjj1NijnjcnjnjedJQZXJtaXNzaW9uIjoiQ2lpdGVuIiwiZXhwIjoxNzYwMjE2NjQ1LCJpcddddkok93772hopHJ3MiOiJGSU4iLCJhdWQiOiIxMTJNb2JpbGV9.Iwo-i_YGlchLsHybKpF3RDfcz8o5M1EDU.
The HttpConnection connected successfully.
Sending handshake request.
(WebSockets transport) sending data. String data of length '32'.
Using HubProtocol 'json'.
E/flutter (16368): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: WebSocket closed with status code: 1002 (null).
E/flutter (16368):
(WebSockets transport) socket closed.
HttpConnection.stopConnection(Exception: WebSocket closed with status code: 1002 (null).) called while in state ConnectionState.connected.
Connection disconnected with error 'Exception: WebSocket closed with status code: 1002 (null).'.
HubConnection.connectionClosed(Exception: WebSocket closed with status code: 1002 (null).) called while in state HubConnectionState.connecting.
HttpConnection.stopConnection(null) called while in state ConnectionState.disconnected.
Call to HttpConnection.stopConnection(null) was ignored because the connection is already in the disconnected state.
Hub handshake failed with error 'Exception: WebSocket closed with status code: 1002 (null).' during start(). Stopping HubConnection.
Call to HttpConnection.stop(Exception: WebSocket closed with status code: 1002 (null).) ignored because the connection is already in the disconnected state.
HubConnection failed to start successfully because of error '{Exception: WebSocket closed with status code: 1002 (null)..toString()}'.
The text was updated successfully, but these errors were encountered:
signalr_core: ^1.1.2
http: ^1.2.0
logging: ^1.2.0
final hubConnection = HubConnectionBuilder()
.withAutomaticReconnect()
.withUrl(
"https://xyz......./chatHub",
HttpConnectionOptions(
await hubConnection.start();
log('Connected to SignalR Hub');
hubConnection.onclose((error) {
log("Connection closed: $error");
});
String? conId = hubConnection.connectionId;
log('conId $conId');
}
void main() {
connect();
Then i get above messages:
Starting HubConnection.
Starting connection with transfer format 'TransferFormat.text'.
Sending negotiation request: https://xyz..../chatHub/negotiate.
Selecting transport 'HttpTransportType.webSockets'.
(WebSockets transport) Connecting.
WebSocket connected to wss://xyz..../chatHub?id=QIB6TRwR-hTYB8cH9SOPRQ&access_token=eyJhbGciOiJIUzIjj1NijnjcnjnjedJQZXJtaXNzaW9uIjoiQ2lpdGVuIiwiZXhwIjoxNzYwMjE2NjQ1LCJpcddddkok93772hopHJ3MiOiJGSU4iLCJhdWQiOiIxMTJNb2JpbGV9.Iwo-i_YGlchLsHybKpF3RDfcz8o5M1EDU.
The HttpConnection connected successfully.
Sending handshake request.
(WebSockets transport) sending data. String data of length '32'.
Using HubProtocol 'json'.
E/flutter (16368): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: WebSocket closed with status code: 1002 (null).
E/flutter (16368):
(WebSockets transport) socket closed.
HttpConnection.stopConnection(Exception: WebSocket closed with status code: 1002 (null).) called while in state ConnectionState.connected.
Connection disconnected with error 'Exception: WebSocket closed with status code: 1002 (null).'.
HubConnection.connectionClosed(Exception: WebSocket closed with status code: 1002 (null).) called while in state HubConnectionState.connecting.
HttpConnection.stopConnection(null) called while in state ConnectionState.disconnected.
Call to HttpConnection.stopConnection(null) was ignored because the connection is already in the disconnected state.
Hub handshake failed with error 'Exception: WebSocket closed with status code: 1002 (null).' during start(). Stopping HubConnection.
Call to HttpConnection.stop(Exception: WebSocket closed with status code: 1002 (null).) ignored because the connection is already in the disconnected state.
HubConnection failed to start successfully because of error '{Exception: WebSocket closed with status code: 1002 (null)..toString()}'.
The text was updated successfully, but these errors were encountered: