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

Error starting SignalR connection: WebSocketException #100

Open
Aruljebaraj opened this issue Nov 11, 2024 · 0 comments
Open

Error starting SignalR connection: WebSocketException #100

Aruljebaraj opened this issue Nov 11, 2024 · 0 comments

Comments

@Aruljebaraj
Copy link

Aruljebaraj commented Nov 11, 2024

I tried using version 1.39 and 1.4.0. getting this error previously it was working
initializeSignalR() async {
try {

  final httpConnectionOptions = HttpConnectionOptions(
      accessTokenFactory: () => Future.value(
          'eyJ0eXAiOiJKV1QiLCJhbGciO3MiOiJQZXJtQXNzaXN0IiwiYXVkIjoiUGVybUFzc2lzdEFwcGxpY2F0aW9ucyJ9.oA6XrGUAaPmV4xsa3rnmKFJgFiZlNcAR4E_V8-e3BmE'),
      logMessageContent: true,
      skipNegotiation: true,
      transport: HttpTransportType.WebSockets);   // skipNegotiation: false throws 401,


  final hubConnection = HubConnectionBuilder()
      .withUrl(
        
          'https://notification/delivery?uniqueId=1240727',
          options: httpConnectionOptions)
      .build();
  await hubConnection.start();

  hubConnection.on(
      'SendDocumentNotificationToGroup', handleReceivedMessage);
  log('SignalR connection started.');
} catch (e) {
  log('Error starting SignalR connection: $e');
}

}

this there any solution for this?

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

1 participant