Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor - Mongo Write error

Tags:

mongodb

meteor

I am getting an unexpected error when i attempt an update with the latest version of meteor.js. The type error doesn't specify which field it fails on and i am not sure if this is a mongo related issue or not. Has anyone seen this error before?

Error in Mongo write: TypeError: boolean is not a function
I20130901-19:44:56.515(-5)?     at writeCallback (packages/mongo-livedata/mongo_driver.js:206)
I20130901-19:44:56.515(-5)?     at Meteor.bindEnvironment.runWithEnvironment (packages/meteor/dynamics_nodejs.js:69)

I was able to stop my client from blocking by specifying a callback to the server side call.

https://gist.github.com/warsamebashir/6408451

like image 794
Warz Avatar asked Aug 24 '26 23:08

Warz


2 Answers

This usually happens to me when I pass {multi:true} as a second argument to Collection.remove on the server.

like image 157
Charles Holbrow Avatar answered Aug 27 '26 14:08

Charles Holbrow


You're calling Collection.update with 5 arguments, which is a little bit too many. Read about it in the docs.

like image 20
Peppe L-G Avatar answered Aug 27 '26 15:08

Peppe L-G



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!