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

MongoDB 3.x #163

Open
Philmod opened this issue Apr 8, 2015 · 13 comments
Open

MongoDB 3.x #163

Philmod opened this issue Apr 8, 2015 · 13 comments

Comments

@Philmod
Copy link

Philmod commented Apr 8, 2015

Hey,

Is Mongoskin ready for MongoDB 3.x?

I've seen that it requires the 1.4.18 native module.

Thanks,
Philmod

@vkarpov15
Copy link
Contributor

So mongoskin 1.4.13 should be compatible with any ~1.4 version of the mongodb npm module. Let me know if you run into any issues with that.

@nevf
Copy link

nevf commented Apr 20, 2015

From what I can tell Mongoskin isn't compatible with MongoDB Native Driver V2 and hence MongoDB V3. For a start it fails in admin.js var Admin = require('mongodb').Admin;. I haven't looked beyond this.

IMHO it is easier and better to develop directly for the Native driver, especially seeing the number of pending issues with MongoSkin.

@vkarpov15
Copy link
Contributor

Nope, latest mongodb driver ~1.4 also supports mongodb server 3.0.

@nevf
Copy link

nevf commented Apr 20, 2015

To use Authentication with MongoDB V3 you need to use MongoDB Native Driver V2. ie. You can't access a Mongo V3 DB which uses authentication with the ~1.4 driver. My app uses authentication and therefore Mongoskin is a non-starter. FYI I am using agenda.js which uses Mongoskin and because of this issue agenda.js breaks. I'm currently refactoring agenda.js so it works directly with the MongoDB V2 driver.

@vkarpov15
Copy link
Contributor

What authentication mechanism are you using and what sort of error are you getting? Node driver >= 1.4.13 supports SCRAM-SHA-1, so there should be no issue using auth with mongodb 3.0

@nevf
Copy link

nevf commented Apr 21, 2015

When I passed authentication details in the url to agenda, which just passes them on to Mongoskin I got an error saying authentication failed and then agenda or mongoshell (not sure which) crashed with an exception. I am using the default SCRAM-SHA1 authentication and the new Wiredtiger DB engine.

@dhritzkiv
Copy link

I am also having issues ("auth failed") with the current mongoskin (through monq) when connecting to MongoDB 3.0 with SCRAM-SHA-1 authentication.

@nevf
Copy link

nevf commented Apr 29, 2015

@dhritzkiv I think that mongoskin does auth against the db you are using with it. If instead you have the auth user specified in the admin db vs. the db you are using with mongoskin, then auth will fail. HTH.

@dhritzkiv
Copy link

@nevf Thanks for the tip. I'll check this out.

@jamesongithub
Copy link

any updates on supporting the 2.1.x driver?

@katmug
Copy link

katmug commented May 25, 2016

I need to use MongoDB 3.X apis like insertMany, bulk operations etc. Are there any plans to support these features in mongoskin? if yes, by when can we expect it?

@thucnc
Copy link

thucnc commented Jan 26, 2018

Mongodb 3.6 even changed the open method, so I had to update the SkinCollection.prototype._open as following to adapt mongodb 3.6 driver.

this._skin_db.open(function(err, client) {
      var db = client.db(client.s.options.dbName)
      if(err) return callback(err);
      db.collection.apply(db, collection_args);
  });

Hope mongoskin officially support this change.

@jakehockey10
Copy link

Did anyone look into @thucnc 's fix? That would be super cool if this worked and got merged.

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

8 participants