0

我收到以下异常:

=> Meteor server restarted
I20130820-00:17:58.852(3)? Exception from setTimeout callback: { stack: [Getter] } MongoError: $or requires nonempty array
I20130820-00:17:58.852(3)?     at Object.Future.wait (/home/alexei/.meteor/tools/4010e5731d/lib/node_modules/fibers/future.js:326:15)
I20130820-00:17:58.853(3)?     at _.extend._nextObject (packages/mongo-livedata/mongo_driver.js:540)
I20130820-00:17:58.853(3)?     at _.extend.forEach (packages/mongo-livedata/mongo_driver.js:570)
I20130820-00:17:58.853(3)?     at _.extend.map (packages/mongo-livedata/mongo_driver.js:582)
I20130820-00:17:58.853(3)?     at _.extend.fetch (packages/mongo-livedata/mongo_driver.js:606)
I20130820-00:17:58.853(3)?     at _.each.Cursor.(anonymous function) [as fetch] (packages/mongo-livedata/mongo_driver.js:444)
I20130820-00:17:58.854(3)?     at MongoConnection.findOne (packages/mongo-livedata/mongo_driver.js:362)
I20130820-00:17:58.854(3)?     at _.extend.findOne (packages/mongo-livedata/collection.js:225)
I20130820-00:17:58.854(3)?     at _.extend.findOne (packages/collectionFS/collectionFS_common.js:4)
I20130820-00:17:58.855(3)?     at _.extend.checkQueue (packages/collectionFS/collectionFS_filehandlers.js:95)
I20130820-00:17:58.855(3)?     - - - - -
I20130820-00:17:58.855(3)?     at Object.toError (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/utils.js:110:11)
I20130820-00:17:58.855(3)?     at Cursor.nextObject.self.queryRun (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/cursor.js:634:54)
I20130820-00:17:58.856(3)?     at Cursor.close (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/cursor.js:903:5)
I20130820-00:17:58.856(3)?     at Cursor.nextObject.commandHandler (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/cursor.js:634:21)
I20130820-00:17:58.856(3)?     at Db._executeQueryCommand (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/db.js:1658:9)
I20130820-00:17:58.856(3)?     at Server.Base._callHandler (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/connection/base.js:378:41)
I20130820-00:17:58.856(3)?     at Server.connect.connectionPool.on.server._serverState (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/connection/server.js:468:18)
I20130820-00:17:58.857(3)?     at MongoReply.parseBody (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
I20130820-00:17:58.857(3)?     at Server.connect.connectionPool.on.server._serverState (/home/alexei/.meteor/packages/mongo-livedata/86ae77f282/npm/node_modules/mongodb/lib/mongodb/connection/server.js:426:20)
I20130820-00:17:58.857(3)?     at EventEmitter.emit (events.js:96:17)

请指教,是什么原因造成的问题?

我在 0.6.5 流星,0.6.6 地铁,0.10.13 节点和 1.3.2 npm。

顺便说一句,应用程序本身工作正常:)

请指教。

谢谢,

阿列克谢

4

1 回答 1

2

Meteor.setTimeout代码块内的查询有一个$or关键字,其中包含一个空数组。您需要至少有两个项目在那里进行操作。

如果您遇到问题/使用某种方式来构建$or查询,您可以使用此代码块更新您的代码,以便我们提供进一步的帮助

于 2013-08-20T00:31:31.077 回答