meteor-sharejs: Failed to get ops

I using METEOR@1.4.0.1. I changed doc and reloaded application. I saw the error in console:

failed to get ops for "docid": MongoError: Failed to parse: sort: "_id.v". 'sort' field must be of BSON type Object.

How can I fix it?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 7
  • Comments: 39 (5 by maintainers)

Most upvoted comments

i am also getting this issue - using meteor 1.4.0.1

" failed to get ops for KeCcKETkXWEAewWJv: MongoError: Failed to parse: sort: “_id.v”. ‘sort’ field must be of BSON type Object."

For meteor 1.4.1.1, If we reset mongoDB using “meteor reset”, then sharejs works. But if we restart meteor server, then we are getting the same error. Basically, For every new id, it works for first time and fails after restart. if we create a new entry in Mongo, that works as long as server doesnt restart.

It might be related to the error message many people have been getting when starting a meteor app after upgrading to 1.4 +

{ [Error: Cannot find module ‘…/build/Release/bson’] code: ‘MODULE_NOT_FOUND’ }

(STDERR) js-bson: Failed to load c++ bson extension, using pure JS version

With Version 0.10.0 the default behaviour was changed that in memory storage is the default.

The problem with the other part is that it is a upstream problem with sharejs, which seems not be maintained anymore.

In ShareJS upstream, this successfully fixes the issue: https://github.com/josephg/ShareJS/pull/410

@DavidSichau how I can switch to in memory storage?

@ricardodovalle Switch to in memory storage and make snapshots on the server which are stored to the DB.

For me this problem was with the old MMAPv1 engine of meteor. With a switch to WiredTiger this problem was resolved.

We use this package with the meteor 1.4.1 since the release of it without problems, with a WiredTiger Storage engine.

@andy4545 @MalcolmGC @mizzao In the release of Meteor 1.4 –

We’ve upgraded the version of MongoDB that ships in the dev bundle from version 2.6.7 to 3.2.6, along with an updated version of the driver. The development database for new apps will now default to using the WiredTiger storage engine; however, you can still connect to databases running the old MMAPv1 engine. You can now also pass additional connection options to the Mongo driver by calling Mongo.setConnectionOptions(options), which allows configuring certificates for SSL encryption, for example.

A huge shout out to @fabs, the Meteor community member who did the bulk of the engineering work for this update.

I assuming the problem lies within the new MongoDB version and driver. Looking into a fix.

I am getting the error too. Running Meteor 1.4.1.1

(STDERR) failed to get ops for {{id}} : MongoError: Failed to parse: sort: “_id.v”. ‘sort’ field must be of BSON type Object.

Looked into it a little bit, inside of the client-side developer console on initial load returns the following error share.uncompressed.js:642 Could not open document: [object Object]

Looked into the file and it appears shareJs can’t open the document/object returned… Help?