rethinkdb / rethinkdb-example-nodejs-chat

A node.js chat application running on rethinkdb
203 stars 75 forks source link

No more rows in the cursor error #15

Closed SeeThruHead closed 9 years ago

SeeThruHead commented 9 years ago
> awesome_chat2k@0.0.2 start /Users/dev/mydockerbuild/rethinkdb-example-nodejs-chat
> node app

   info  - socket.io started
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
RqlDriverError: No more rows in the cursor.
node -v // v.0.12.7``
sw_vers -productVersion // 1.0.10.4
docker -v // DOcker version 1.8.2, build 0a8c2e3
danielmewes commented 9 years ago

@deontologician any ideas?

tobiastraxel commented 9 years ago

I got the same message when trying to login with the username instead of the email address. With the email it works fine, even with node 4.1.1.

deontologician commented 9 years ago

I don't have any ideas currently, but I will look into it when I get some time

coffeemug commented 9 years ago

I just fixed it via https://github.com/rethinkdb/rethinkdb-example-nodejs-chat/commit/980e8375a6dbbf3a858885c6002540a6dacecc24.

Note that the app right now allows registering duplicate users (since it doesn't use login as the primary key). Once we fix that, we can simply call .get instead of .getAll/.filter and avoid cursors all together. I didn't have time to do that though, so I just handled the case when the cursor is empty.