crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Call client`s RPC from server and client breaks the connection ProtocolError #910

Open Dencgik opened 7 years ago

Dencgik commented 7 years ago

We use the crossbar in our project where clients have a bad dial-up connection (ppp over 2g network). I cant find a solution. When call client`s RPC from server and client breaks the connection. After that my procedure stopped and i have this error :

Traceback (most recent call last): File "/home/dencgik/Dropbox/prj/.ps-crossbar/local/lib/python2.7/site-packages/autobahn/wamp/websocket.py", line 95, in onMessage self.session.onMessage(msg) File "/home/dencgik/Dropbox/prj/.ps-crossbar/local/lib/python2.7/site-packages/crossbar/router/session.py", line 470, in onMessage raise ProtocolError(u"Received {0} message, and session is not yet established".format(msg._class)) ProtocolError: Received message, and session is not yet established

I can`t cath it. How can I discribe and work with this exeption? Thank you!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38721373-call-client-s-rpc-from-server-and-client-breaks-the-connection-protocolerror?utm_campaign=plugin&utm_content=tracker%2F462544&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F462544&utm_medium=issues&utm_source=github).
meejah commented 7 years ago

On master it seems that particular message got removed by @oberstet recently (in 448e8f576431c6b2b12059bb12c996e0161cdfc0). I'm not sure why, but this could probably for example happen if there's a "Goodbye then Publish" in the queue of messages and so we process the goodbye first (so the session becomes invalid) and then the publish "arrives" right after.

That said, your real issue could be a case of improper error-handling on in-flight messages like https://github.com/crossbario/crossbar/issues/532 (which does have a fix). Have you tried with crossbar from latest master (i.e. instead of latest release). Do you have a way to repeat this case?

oberstet commented 7 years ago

That said, your real issue could be a case of improper error-handling on in-flight messages like

Yep, this was also my first thought ..