This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Mongoose / MongoDB error (related to replica set maybe)? #105
Labels
Comments
We apologize for the bug you've found, and thank you for the error report!
We'll get this fixed and a patch release out as soon as possible.
To aide in our efforts to reproduce this, can you verify the version of the mongodb package installed by Mongoose for us?
… On May 15, 2017, at 3:33 AM, Kristoffer Klintberg ***@***.***> wrote:
Just installed glimpse and tried running it in a very simple application, which basically does a .find on some Mongoose model, and it throws the error below.
Update when looking deeper into this: This only occurs when I connect to a replica set hosted on MongoDB Atlas though, not when running a single mogod on my own computer.
Versions
Mongoose: 4.9.9
Express: 4.15.2
Node: 6.10.3
TypeError: Cannot read property 'availableConnections' of undefined
at Function.MongoDBInspector.GetConnectionInfoFromCursor ***@***.***/glimpse-agent-node/release/inspectors/MongoDBInspector.js:537:40)
at MongoDBInspector.readStartInspector ***@***.***/glimpse-agent-node/release/inspectors/MongoDBInspector.js:461:51)
at Object.listeners._a.(anonymous function) [as listener] ***@***.***/glimpse-agent-node/release/inspectors/MongoDBInspector.js:144:23)
at Tracing.publish ***@***.***/glimpse-agent-node/release/tracing/Tracing.js:31:26)
at MongoDBProxy.cursorStartReadProxyCallbackOrPromise ***@***.***/glimpse-agent-node/release/tracing/module_instrumentors/MongoDBProxy.js:131:31)
at Cursor.proxy [as toArray] ***@***.***/glimpse-agent-node/release/tracing/module_instrumentors/MongoDBProxy.js:63:40)
at /APP_PATH/node_modules/mquery/lib/collection/node.js:29:12
at handleCallback (/APP_PATH/node_modules/mongodb/lib/utils.js:120:56)
at Collection.find (/APP_PATH/node_modules/mongodb/lib/collection.js:385:44)
at NativeCollection.(anonymous function) [as find] (/APP_PATH/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:126:28)
at NodeCollection.find (/APP_PATH/node_modules/mquery/lib/collection/node.js:26:19)
at Query.find (/APP_PATH/node_modules/mquery/lib/mquery.js:1730:20)
at Query._find (/APP_PATH/node_modules/mongoose/lib/query.js:1135:26)
at /APP_PATH/node_modules/kareem/index.js:257:8
at /APP_PATH/node_modules/kareem/index.js:23:7
at wrappedCallback ***@***.***/glimpse-agent-node/release/async-track/async-track.js:293:33)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
From my yarn.lock file:
|
Thanks for reporting this @krstffr. Any chance you can get us a small project that reproduces the issue? I'll take a quick look at our logic. I thought our mongo DB instrumentation was turned off at the moment... |
Hi @mike-kaufman, the problem though is that it works when using my local DB, but not when I'm using the MongoDB Atlas one, so I might be able to set up this testv app for you if you yourselves are willing to set up an Atlas DB account etc since I unfortunately can't lend you mine? |
Thanks @krstffr. I'll see if I can set up an atlas DB & repro this... |
Cool @mike-kaufman, thanks a lot! |
Got the same error too with compose.io (db got replica) using https://github.com/Automattic/monk. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Just installed glimpse and tried running it in a very simple application, which basically does a .find on some Mongoose model, and it throws the error below.
Update when looking deeper into this: This only occurs when I connect to a replica set hosted on MongoDB Atlas though, not when running a single mogod on my own computer.
Versions
Mongoose: 4.9.9
Express: 4.15.2
Node: 6.10.3
The text was updated successfully, but these errors were encountered: