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
collection.find() not firing/returning empty array on server #86
Comments
Everything you have here looks ok. It's possible something is timing out or not connecting properly (how are you determining that?). This is a good candidate for GH-85. |
I'm currently checking the Agreed, I'll play around with #85 tomorrow. |
I've found some interesting code. It seems to run through the library until it hits this line of code. I can find an _authorizeQueue variable in one other function but It sets the var to [] at the beginning of the function.
and a contrived stack trace on the line above the above function:
It would seem that the command never gets sent and instead ends it's life in an array that never gets used at db.js:87 Commit 767d7b8 is where this code was introduced I plugged in this code just underneath the
and this error pops up:
|
Fixed the issue. Ends up mongod was running without --auth and we were trying to authenticate against it with a username and pw that were in the users collection. Running mongod --auth fixed the issue. |
This code works on my local computer. I can successfully connect to a remote database server and return an array of matches.
When I upload the same exact code to the app server, The connection to the database server is successful, however, the .find() doesn't fire.
In another case the the same find function returns an empty array on the server (The find() function works fine when running on my local computer with a remote database).
Am I missing something obvious here?
The text was updated successfully, but these errors were encountered: