Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Mongoose / MongoDB error (related to replica set maybe)? #105

@krstffr

Description

@krstffr

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 (/APP_PATH/node_modules/@glimpse/glimpse-agent-node/release/inspectors/MongoDBInspector.js:537:40)
    at MongoDBInspector.readStartInspector (/APP_PATH/node_modules/@glimpse/glimpse-agent-node/release/inspectors/MongoDBInspector.js:461:51)
    at Object.listeners._a.(anonymous function) [as listener] (/APP_PATH/node_modules/@glimpse/glimpse-agent-node/release/inspectors/MongoDBInspector.js:144:23)
    at Tracing.publish (/APP_PATH/node_modules/@glimpse/glimpse-agent-node/release/tracing/Tracing.js:31:26)
    at MongoDBProxy.cursorStartReadProxyCallbackOrPromise (/APP_PATH/node_modules/@glimpse/glimpse-agent-node/release/tracing/module_instrumentors/MongoDBProxy.js:131:31)
    at Cursor.proxy [as toArray] (/APP_PATH/node_modules/@glimpse/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 (/APP_PATH/node_modules/@glimpse/glimpse-agent-node/release/async-track/async-track.js:293:33)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions