setInterval回调中的异常:MongoError:无法将$ pull应用于非数组值

时间:2016-11-01 19:31:17

标签: mongodb meteor minimongo

我的meteor应用程序运行时,我在cmd中一直收到此错误。它似乎没有干扰任何东西(至少我看不到任何东西)所以我无法说出它的来源。

Exception in setInterval callback: MongoError: Cannot apply $pull to a non-array value
at Object.Future.wait (C:\Users\admin\AppData\Local\.meteor\packages\meteor-tool\1.4.1_3\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:449:15)
at MongoConnection.<anonymous> (packages/meteor/helpers.js:119:1)
at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:774:49)
at [object Object].update (packages/mongo/collection.js:589:29)
at AccountsServer.Ap._expirePasswordResetTokens (packages/accounts-base/accounts_server.js:1137:14)
at packages/accounts-base/accounts_server.js:1174:14

at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at packages/meteor/timers.js:6:1
at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
- - - - -
at Function.MongoError.create (C:\Users\admin\AppData\Local\.meteor\packages\npm-mongo\2.2.11_2\npm\node_modules\mongodb-core\lib\error.js:31:11)
at toError (C:\Users\admin\AppData\Local\.meteor\packages\npm-mongo\2.2.11_2\npm\node_modules\mongodb\lib\utils.js:115:22)
at C:\Users\admin\AppData\Local\.meteor\packages\npm-mongo\2.2.11_2\npm\node_modules\mongodb\lib\collection.js:1046:67
at C:\Users\admin\AppData\Local\.meteor\packages\npm-mongo\2.2.11_2\npm\node_modules\mongodb-core\lib\connection\pool.js:455:18
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)

我该如何解决?

2 个答案:

答案 0 :(得分:2)

你在运行什么版本的流星?

我怀疑您遇到了this bugfixed here

尝试更新(meteor update),看看这是否可以解决您的问题。

答案 1 :(得分:0)

将meteor(meteor update)更新到版本1.4.2完全消除了这个问题。