-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when update document with set() #411
Comments
It's probably not something related with Astronomy but you have to create reproduction because it's hard to tell. Version 3 of what? There is no version 3 of Astronomy. |
My bad, it's version 2. |
Just create reproduction repository with only Astronomy added to the project. If problem persists that means the problem is on Astronomy side. |
I've got the same issue using save() for updating inside a meteor.method. Probably related to kadira:debug, as it went away when I removed the package. Maybe close to meteorhacks/kadira#12 and meteorhacks/kadira#83 if not kadirahq/meteor-debug#11. |
This is my method to update a document:
actions.js
But when I run this method, I get this exception:
Exception while invoking method 'UpdateSpot' { stack: 'TypeError: Cannot read property \'upsert\' of undefined\n at MongoConnection.mongoConnectionProto.(anonymous function) [as update] (packages/meteorhacks_kadira/lib/hijack/db.js:73:1)\n at OptimizedApply (packages/meteorhacks_kadira/lib/utils.js:31:1)\n at Object.ret.(anonymous function) [as update] (packages/meteorhacks_kadira/lib/hijack/db.js:20:1)\n at documentUpdate (packages/jagi:astronomy/lib/modules/storage/utils/document_update.js:75:41)\n at Class.save (packages/jagi:astronomy/lib/modules/storage/class_prototype_methods/save.js:106:50)\n at [object Object].UpdateSpot (apps/booking/server/actions.js:129:11)\n at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/lib/hijack/wrap_session.js:164:1)\n at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1704:12)\n at packages/ddp-server/livedata_server.js:711:19\n at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)',
However, the document properly updated though.
This only happens when updating document with set() method. For creating new document, it is working without any error.
I am using version 3.
The text was updated successfully, but these errors were encountered: