Closed javierbarre closed 3 years ago
What we found is that in the case that is hosted in azure (and probably because connection speed?) looks like two messages come in one "on_message" execution (see the last socket_trace)
A quick work around for us was to modify base_hub_connection.py
def on_message(self, raw_message):
if "{}" in raw_message:
self.on_message1("{}")
if len(raw_message) > 2:
self.on_message1(raw_message.replace("{}", ""))
else:
self.on_message1(raw_message)
def on_message1(self, raw_message):
It worked ok. Let us know a permanent fix
Thanks
@javierbarre tried Your solution but with no success :(
What is interesting, that it works on desktop, but refuses to handshake on our Jetson device.
Do you have the socket_trace out put?
On Thu, Mar 4, 2021 at 12:53 PM Stanisław notifications@github.com wrote:
@javierbarre https://github.com/javierbarre tried Your solution but with no success :(
What is interesting, that it works on desktop, but refuses to handshake on our Jetson device.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mandrewcito/signalrcore/issues/42#issuecomment-790807883, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJSCIAPTHNPFU3YDJTXHE3TB7CKBANCNFSM4SPGYUVQ .
-- Javier Barreiro *ANT* Automation 651 Holiday Dr STE 400, Pittsburgh, PA 15220 Ph: +1 412 736 9170 www.ant-automation.com https://www.facebook.com/antautomation/
https://twitter.com/Replic_ANT https://www.youtube.com/channel/UCvDvkF7LUwemQSx9FjiWBJw https://www.linkedin.com/company/ant-automation-applying-new-technologies- [image: aaa] https://www.ant-automation.com
@javierbarre I tried socket_trace
, but didn't find anything useful. What I should look for?
It was just asking, to check that if the issue was the same I had. Check if the raw message received is more than one element.
In my case, the issue was that the message received was split into two objects (one of the EMPTY)
Example (as in my second post on this thread)
2020-10-13 12:15:42,542 - SignalRCoreClient - DEBUG - Message received{}{message_with_all_fields_here}
As you can see the raw Message received had two {}{xxx} elements. So I find that the def on_message(self, raw_message):
function didn't expect a case like that. Two "elements" in the same raw message.
Hi,
I think that this commits solves your issue,
I will comment here when the new version gets published
Basically, i made a mistake. Handshake´s function only considers an incoming message, not various. I fixed it in the following commit:
https://github.com/mandrewcito/signalrcore/commit/e99dd33089c49229ec2c543256f7b8502cc190e6
thanks, and sorry for the delay!
That's great!!! Thank you for solving this issue
I have a signalr server working locally and the py lib is receiving and executing the "OnConnected" callback OK.
But when this same server is hosted in azure (slower connection and https), the OnConnected Callback does not execute in the client.
Here is the socket_trace when server is hosted locally, and with the callback working:
Here is the same socket_trace when server is hosted in azure, the trace shows a MessageReceived but the OnConnected is not executing: