jamiewest / signalr_core

ASP.NET Core SignalR Dart Client
https://pub.dev/packages/signalr_core
MIT License
90 stars 58 forks source link

Failed to start the transport 'HttpTransportType.LongPolling': type 'Null' is not a subtype of type 'String' in type cast #79

Closed jrizani closed 2 years ago

jrizani commented 2 years ago

Why I cannot start the connection? I use longpolling transport, this is my log flutter: FINEST: 2021-12-03 14:01:43.050495: (LongPolling transport) polling: http://myserver/signalr?id=BXLNU7zyRfpM23oX5u_g5A&_=2021-12-03 14:01:43.050220 flutter: SEVERE: 2021-12-03 14:01:43.066492: Failed to start the transport 'HttpTransportType.LongPolling': type 'Null' is not a subtype of type 'String' in type cast flutter: SEVERE: 2021-12-03 14:01:43.067837: Failed to start the connection: Unable to connect to the server with any of the available transports. HttpTransportType.ServerSentEvents failed: Skipping transport 'HttpTransportType.ServerSentEvents' because it was disabled by the client. HttpTransportType.LongPolling failed: type 'Null' is not a subtype of type 'String' in type cast flutter: FINER: 2021-12-03 14:01:43.068564: HubConnection failed to start successfully because of error 'Unable to connect to the server with any of the available transports. HttpTransportType.ServerSentEvents failed: Skipping transport 'HttpTransportType.ServerSentEvents' because it was disabled by the client. HttpTransportType.LongPolling failed: type 'Null' is not a subtype of type 'String' in type cast'. Application finished.

jrizani commented 2 years ago

I have fixed with add WebSupportingHttpClient as httpclient