-
Notifications
You must be signed in to change notification settings - Fork 53
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
Failed to get ops #81
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." |
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 |
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 Looked into the file and it appears shareJs can't open the document/object returned... Help? |
Any resolution on this topic?. I have been getting the same error |
Me, too. Any suggestions? |
I received the same error after running just fine until I did a meteor update:This project is already at Meteor 1.4.1.1, the latest release.
|
I am getting the same error. Happened after I updated to 1.4 |
@MalcolmGC I created a new meteor project and only added the mizzao:sharejs package on top of the basic meteor install using iron-cli. The same error occurred in this basic project - therefore the issue must lie with :
Unfortunately I only ever used mizzao:sharejs after 1.4 meteor came out - therefore I have not experienced it fully working. |
@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. |
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. |
But then, what should we do if we had to edit previous entry and we had restarted the server? |
That issue needs to be fixed from their end. I am still not sure if this problem is from MongoDB or sharejs |
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. |
https://projectricochet.com/blog/why-you-want-use-wiredtiger-meteor-14#.WBDrNo99670 Here is the solution to the problem. |
I close it as it the problem can be solved by switching to wireTiger |
I followed the article linked by @cure100061148
and encounter the same behaviour. This issue is closed but I can't see how this behaviour got solved. I would appreciate help! |
Can you print me the command of mongo shell after a restart:
|
Hi, i've been experiencing the same issues as well even after following the above instructions. The following is the result after running the mentioned command.
I've actually tried more than the recommended instructions. I've looked into my own environment variables to ensure that everything is up to spec. I'm currently on Meteor 1.4.2, but i've run meteor in multiple configurations from 1.4.0 to 1.4.1 to even 1.4.2, but to no avail. The versions for my sharejs and ace editor are as follows: Have done extensive searching online as well, not sure if its related to the following: https://github.com/josephg/ShareJS/pull/410/files Appreciate the help! |
So this seems to be a upstream problem with sharejs. I will follow this and as soon as they update sharejs I will merge it into this. In the mean time you habe the choice to disable the persistent storage of sharejs and switch to in memory storage. |
Ahhh ok! Would there be any implications to an app in a production environment if such a switching is done? |
We use it in production since the release of 1.4 without any problems. However we store the editors data every 10sec in our own db. If no one has open the document all sharejs data is droped such that only changes in the current editing session are synced. |
Sorry for not replying, I was offline for a week. The output I get for
The idea to switch to in memory storage is very helpful, since my app already saves a copy of the editors data at the end of editing to a separate location. However, I can't figure out how to paste the text that I saved to my own db back into the shareJs textarea to pickup editing where it was left? This is my current attempt:
but it doesn't work. The shareJS textarea stays blank. |
We add the document on the create function on shareJS on the Server side. Here is our code we use for that. The documents are stored in MDs.md. Hope this helps you,
|
Hi there: When I changed the OS to debian 8.6(64-bit), I got the wiredTiger. However I still get the same error that I use package is mizzao:sharejs-codemirror. Please help me! This is my mongo commend : PS My package is mizzao:sharejs-codemirror Thank you for your help! |
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. |
Hi @DavidSichau , Whats is the best way to solve it and keep using meteor-sharejs? Thanks. |
@ricardodovalle Switch to in memory storage and make snapshots on the server which are stored to the DB. |
@DavidSichau how I can switch to in memory storage? |
You can use Version 0.10.0 where this is the default. Otherwise change your Setting file that type is not equal to mongo: https://github.com/mizzao/meteor-sharejs/blob/master/settings-example.json |
@DavidSichau thank you so much for your help! You saved my life. After long absence from this project I finally tried your suggestion and
works like a charm for inserting content at the beginning of a session. Out of curiosity I also tried your suggested
but there I get an error: I currently can't identify the problem in my code and am wondering if the cause is to be found this package or the share shareJS package. Any ideas? Here is my adjusted version of your suggestion:
|
I do not see the Problem in your code, do you have any methods that are executed on the Scenarios Collection, which depend on userId? Like a default or autovalue field. |
In ShareJS upstream, this successfully fixes the issue: josephg/ShareJS#410 |
@rajit Thanks for the info. As soon as this gets merged and publish I will update this package. |
Don't hold your breath, it's been 6 months! I've forked it here https://github.com/qeek/sharejs-tmp-fork and am using that for now:
Also needs a minor change in meteor-sharejs to require BCSocket correctly. I'll open a pull request. |
Pull request opened: #84 |
@rajit Thanks for your effort. sharejs base version 0.10.1 is now released which will fix this problem with mongo 3.2 or later. |
For anyone coming looking for a solution to this, unfortunately 0.10.1 did not work for me. I've submitted #85. If it gets merged and released that should work. Until then I've published |
It is merged and released as 0.10.2. |
Fantastic, thank you! I can confirm that 0.10.2 works for me, I'll remove |
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?
The text was updated successfully, but these errors were encountered: