New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDP Web Socket Reset Cycle in Meteor 0.8.1.1 #2125
Comments
The ObjectiveDDP maintainer says that Meteor v0.8.1.1 requires a pre2 DDP protocol version instead of the hardcoded pre1. He says he is going to fix it right away. |
While on the one hand, the library maintainer should upgrade to use pre2, it's supposed to be backwards compatible with pre1. It looks like the problem is So all of these things should happen:
|
Previously, you could leave out the "support" field (or claim to not support the version you were proposing) which would mean your connection would succeed iff the proposed version is the server's favorite version. This led to (eg) ObjectiveDDP accidentally writing a client that stopped working when servers started preferring pre2 over pre1. By making this a blatant error, DDP client libraries are more likely to be written in a way that works with version negotiation. Also, remove the delay in sending connect failure messages, which was intended to avoid connect storms from clients that are by now 1.5 years old. Fixes #2125.
@glasser i am using it with pre2. It connects to server for 1 minute. Am able to retrive data. But then the next minute the connection gets disconnected. And this loop is happening over and over again. |
@jamesfebin This sounds like a different issue. I hope the good folks at https://github.com/boundsj/ObjectiveDDP can help you with it; if it turns out to be a Meteor issue, read https://github.com/meteor/meteor/wiki/Contributing-to-Meteor#reporting-a-bug-in-meteor and open a bug here. |
@jamesfebin, just an idea: if you are proxying through nginx, I'm pretty sure it has a default websocket timeout of 60s. |
Sending nil is nonconformant and should result in a disconnection, because the client is then saying “I don’t support any protocol versions at all”, according to meteor/meteor#2125 . Sending “support: [‘pre1’]” is a more correct fix than sending “version: pre2”, since ObjectiveDDP doesn’t actually support pre2 yet. This is a more correct fix to boundsj#74 .
DESCRIPTION
Was there a change in the websocket implementation in Meteor v0.8.1.1?
A corresponding ObjectiveDDP issue has been created here: boundsj/ObjectiveDDP#74
PRE-REQUISITES
STEPS TO REPRODUCE
Run the iOS app in the simulator.
ACTUAL BEHAVIOR
meteor-example-failing-0.8.1.1
Observe that a "You are not connected" error is returned from the login call. The websocket then goes into a cycle of being ready and not ready.
The websocketReady/NotReady cycle is caused by the SocketRocket delegate method below, called with a code of 1000 and a nil reason string. wasClean is true.
ObjectiveDDP makes the websocket connection using the following command. Note the "pre1" protocol version. Is this the version that should be used with Meteor v0.8.1.1?
EXPECTED BEHAVIOR
meteor-example-passing-0.8.0.1
To demonstrate expected behavior, execute the same steps to reproduce, except start meteorite from the meteor-example-passing-0.8.0.1 directory.
The text was updated successfully, but these errors were encountered: