Skip to content
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

Some errors after implementation #34

Closed
maxnowack opened this issue Nov 15, 2016 · 5 comments
Closed

Some errors after implementation #34

maxnowack opened this issue Nov 15, 2016 · 5 comments

Comments

@maxnowack
Copy link
Contributor

I've implemented redis-oplog and I'm seeing some errors in my console.

I20161115-11:46:16.823(1)? Exception in defer callback: MongoError: Positional projection 'users.$.statusSince' does not match the query document.
I20161115-11:46:16.824(1)?     at Object.Future.wait (/Users/maxnowack/.meteor/packages/meteor-tool/.1.4.2.867yju++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:449:15)
I20161115-11:46:16.826(1)?     at SynchronousCursor._nextObject (packages/mongo/mongo_driver.js:1024:47)
I20161115-11:46:16.828(1)?     at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1058:22)
I20161115-11:46:16.830(1)?     at SynchronousCursor.map (packages/mongo/mongo_driver.js:1068:10)
I20161115-11:46:16.831(1)?     at SynchronousCursor.fetch (packages/mongo/mongo_driver.js:1092:17)
I20161115-11:46:16.834(1)?     at Cursor.(anonymous function) [as fetch] (packages/mongo/mongo_driver.js:907:44)
I20161115-11:46:16.835(1)?     at packages/cultofcoders:redis-oplog/lib/mongo/collection.extension.js:82:20
I20161115-11:46:16.836(1)?     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
I20161115-11:46:16.838(1)?     at packages/meteor.js:445:45
I20161115-11:46:16.840(1)?     at runWithEnvironment (packages/meteor.js:1176:24)
I20161115-11:46:16.841(1)?     - - - - -
I20161115-11:46:16.842(1)?     at Function.MongoError.create (/Users/maxnowack/.meteor/packages/npm-mongo/.2.2.11_2.13qd484++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/error.js:31:11)
I20161115-11:46:16.844(1)?     at queryCallback (/Users/maxnowack/.meteor/packages/npm-mongo/.2.2.11_2.13qd484++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/cursor.js:213:36)
I20161115-11:46:16.846(1)?     at /Users/maxnowack/.meteor/packages/npm-mongo/.2.2.11_2.13qd484++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:455:18
I20161115-11:46:16.847(1)?     at nextTickCallbackWith0Args (node.js:420:9)
I20161115-11:46:16.848(1)?     at process._tickCallback (node.js:349:13)
I20161115-11:46:17.836(1)? Exception in queued task: TypeError: observableCollection.update is not a function
I20161115-11:46:17.837(1)?     at handleUpdate (packages/cultofcoders:redis-oplog/lib/processors/direct.js:26:26)
I20161115-11:46:17.853(1)?     at module.export.exports.default (packages/cultofcoders:redis-oplog/lib/processors/direct.js:11:13)
I20161115-11:46:17.855(1)?     at Object.task (packages/cultofcoders:redis-oplog/lib/redis/RedisSubscriber.js:59:28)
I20161115-11:46:17.856(1)?     at [object Object]._.extend._run (packages/meteor.js:807:18)
I20161115-11:46:17.856(1)?     at packages/meteor.js:785:14
I20161115-11:46:18.960(1)? Exception from sub notificationsCount id ejLC7rcfg4SgfnanB TypeError: Cannot read property '_cursorDescription' of undefined
I20161115-11:46:18.960(1)?     at packages/cultofcoders:redis-oplog/lib/utils/shouldPublicationBeWithPolling.js:11:29
I20161115-11:46:18.961(1)?     at Array.forEach (native)
I20161115-11:46:18.962(1)?     at module.export.exports.default (packages/cultofcoders:redis-oplog/lib/utils/shouldPublicationBeWithPolling.js:6:13)
I20161115-11:46:18.962(1)?     at Subscription.<anonymous> (packages/cultofcoders:redis-oplog/lib/publishWithRedis.js:41:13)
I20161115-11:46:18.963(1)?     at packages/matb33_collection-hooks.js:307:21
I20161115-11:46:18.963(1)?     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
I20161115-11:46:18.964(1)?     at Subscription._handler (packages/matb33_collection-hooks.js:306:28)
I20161115-11:46:18.964(1)?     at packages/check.js:130:16
I20161115-11:46:18.965(1)?     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
I20161115-11:46:18.965(1)?     at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:129:41)

For the first two I have no idea where they come from. The last one may have something todo with a publish function, that returns this.ready() instead of a cursor.

@theodorDiaconu
Copy link
Contributor

Last 2 fixed. Tell me the query you make for the first one. "statusSince" @maxnowack

@theodorDiaconu
Copy link
Contributor

Nvm I get it, you make an update with a positional selector. Will fix soon.

@maxnowack
Copy link
Contributor Author

maxnowack commented Nov 15, 2016

Sure. It seems to be this one:

Teams.update({ _id: team._id, 'users.userId': userId }, {
  $set: { 'users.$.statusSince': new Date() },
})

It sets the statusSince field for a specific user in a document specific team.
See positional operators in mongodb

Edit: you were faster :)

@theodorDiaconu
Copy link
Contributor

theodorDiaconu commented Nov 15, 2016

@maxnowack yep, on it right now! I'll push the fixes soon. Thank you

@theodorDiaconu
Copy link
Contributor

@maxnowack published 1.0.4 pls update and check. thanks again for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants