Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access .withAutomaticReconnect function in SignalR v1.1.4

I saw that the automatic redirect has been implemented in signalR js client. I've updated signalR to version 1.1.4 and after that I tried to create new hubConnectionbuilder like this:

this.connection = new signalR.HubConnectionBuilder()
      .configureLogging(signalR.LogLevel.None)
      .withUrl(REMOTE_SOCKET_ENDPOINT, options)
      .withAutomaticReconnect()
      .build();

I am working on mobile application and when I run it, it throws error, saying that withAutomaticReconnect is not a function. I also noticed that this function is not visible when typing. What could be the reason for not seeing the function when I am creating the hub connection ? Thank you!

like image 912
Георги Попов Avatar asked Oct 31 '19 15:10

Георги Попов


1 Answers

Version 1.1.4 doesn't contain withAutomaticReconnect. Version 3.0.0 is the latest version for .net core. I had this problem and npm install @microsoft/signalr@latest solved this.

like image 75
Will Dales Avatar answered Nov 14 '22 22:11

Will Dales