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
Problem with connecting mongodb driver 2.0.x #161
Comments
Seems like |
Most of the connection strategies are not tested yet :( |
I have a similar issue, I upgraded to mongodb native 2.0.21 from 1.4.32 and it stopped working. My code is the same as @barisusakli Edit: I am using mongo 2.6.8 |
A temp work around that works for me
|
I'm on it. |
@barisusakli oh does it? I have this king of log:
|
Made a little fix in #165 |
I'm passing an existing Db instance to connect-mongo. The fix in #165 doesn't work for me, I still have to set |
How can we detect the state of this existing Db instance in mongodb driver 2.0? |
yep, same thing.
It seems like "fullsetup" event can be used for that, I'll try to have a look |
As far as I see, db.open() shouldn't be run directly now: The proof of this is that connect-mongo works nice when db.openCalled is set to true and db.collection() runs inside initWithNativeDb. And here are some links: 1.4 has openCalled property set to true when open() has been called: 2.0 doesn't have this property at all: |
Huh, I killed the whole day for this issue. Why not to mention in docs? Your 5 minutes will save time for people. |
@chapati did v0.8.1 help you or not? |
@1999 Haven't checked yet. Figured out the same workaround with openCalled = true as suggested above. Will try v0.8.1 soon. |
Mongodb 3.0
node-mongodb-native 2.0.19
connect-mongo 0.7.0
When I run a query on the database it never calls the callback. If I remove the connect mongo init code it works fine. Here is the relevant code.
The text was updated successfully, but these errors were encountered: