christkv/node-mongodb-native — Issue #403: Error in 0.9.7
Author: scriby
Created: 2011-11-14 13:57:25+00:00
State: open

Hi,

I tried updating the mongodb driver from 0.9.6-23 and one of my automated tests is throwing an error. Here's the stack trace:

```javascript
TypeError: Object.keys called on non-object
at Function.keys (native)
at Function.calculateObjectSize (/home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/bson/bson.js:81:26)
at [object Object].toBinary (/home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/commands/query_command.js:72:114)
at [object Object].write (/home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/connection/connection.js:72:45)
at /home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/db.js:735:16
at [object Object]._executeQueryCommand (/home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/db.js:859:5)
at [object Object].nextObject (/home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/cursor.js:482:13)
at Array.1 (/home/ubuntu/sourcecode/folkLOR/node_modules/mongodb/lib/mongodb/cursor.js:169:12)
at EventEmitter._tickCallback (node.js:126:26)
```

In my preliminary debugging, I've figured out the problem is that the QueryCommand has a null query. I haven't figured out why, though. I'll keep looking into it, I just wanted to pass this along to see if you had any ideas.

Thanks,

Chris