DEV Community

Discussion on: SignalR core python client: A simple Chat Hub Client

 
mandrewcito profile image
Andrés Baamonde Lozano

Can you show SendMessage declaration and the call for hubconnection.send ¿?. That will be helpful

Thread Thread
 
arthas1888 profile image
Gustavo Adolfo Morales

this is the repo github.com/arthas1888/TestSignalRP..., please check it, thanks
attacth image of the error

Thread Thread
 
arthas1888 profile image
Gustavo Adolfo Morales • Edited

I found the error is the next:

Error when processing requests.
System.IO.InvalidDataException: Expected 'streamIds' to be of type Array.
   at Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.ParseMessage(ReadOnlySequence`1 input, IInvocationBinder binder)
   at Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.TryParseMessage(ReadOnlySequence`1& input, IInvocationBinder binder, HubMessage& message)
   at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.DispatchMessagesAsync(HubConnectionContext connection)
   at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.RunHubAsync(HubConnectionContext connection)

and only occurs when I send some msg from signalr client python

Thread Thread
 
mandrewcito profile image
Andrés Baamonde Lozano

yes, i just fixed it on version 0.8.1 >.< you can download it! my bad :(

Thread Thread
 
arthas1888 profile image
Gustavo Adolfo Morales

Ohhh thanks so much, on other hand I found another error, when I use reconnect option, and I shut the web app the python script become crazy, open and close the connection and when run the app again is worst

 dbug: Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager[2]
      Removing connection Dzkn8DxPR9X12-Tnvpt3Rg from the list of connections.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[4]
      Waiting for the application to finish sending data.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[4]
      Waiting for the application to finish sending data.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[2]
      Socket closed.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[2]
      Socket closed.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager[2]
      Removing connection n9ouQEgkR-s8-GGeAOqsxQ from the list of connections.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager[2]
      Removing connection jk8OfY3v9fcpQnVqfTUKcA from the list of connections.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[4]
      Waiting for the application to finish sending data.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[2]
      Socket closed.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager[2]
      Removing connection RM207tkuWjX4QRsFNYJhDQ from the list of connections.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[4]
      Waiting for the application to finish sending data.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport[2]
      Socket closed.
dbug: Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager[2]
      Removing connection S28Oe86KWmo_2O4KvmJf7A from the list of connections.
Thread Thread
 
mandrewcito profile image
Andrés Baamonde Lozano

hmm, I'll check it later. I have a lot of issues/features pending related to the reconnection. I will code them on the following days.

Thread Thread
 
arthas1888 profile image
Gustavo Adolfo Morales

ok thanks so much

Thread Thread
 
arthas1888 profile image
Gustavo Adolfo Morales

I uploaded a new version of this signalR client including improves in re-connections, please check it and if you look everything good you can update your library, thanks
the link github.com/arthas1888/TestSignalRP...