Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

MongoDB 3.6 Version aggregate error #368

Open
ne0c0de opened this issue Aug 3, 2018 · 2 comments
Open

MongoDB 3.6 Version aggregate error #368

ne0c0de opened this issue Aug 3, 2018 · 2 comments

Comments

@ne0c0de
Copy link

ne0c0de commented Aug 3, 2018

Hello,

I just installed the latest version of uptime with the latest version of NodeJS and MongoDB version with 3.6

But I'm getting this error on backend:

{ MongoError: The 'cursor' option is required, except for aggregate with the explain argument
    at Object.exports.toError (/uptime/node_modules/mongodb/lib/mongodb/utils.js:108:11)
    at /uptime/node_modules/mongodb/lib/mongodb/collection.js:1649:22
    at Cursor.nextObject (/uptime/node_modules/mongodb/lib/mongodb/cursor.js:653:5)
    at commandHandler (/uptime/node_modules/mongodb/lib/mongodb/cursor.js:635:14)
    at CallbackStore.<anonymous> (/uptime/node_modules/mongodb/lib/mongodb/db.js:1709:18)
    at Object.onceWrapper (events.js:273:13)
    at CallbackStore.emit (events.js:182:13)
    at Server.Base._callHandler (/uptime/node_modules/mongodb/lib/mongodb/connection/base.js:130:25)
    at /uptime/node_modules/mongodb/lib/mongodb/connection/server.js:522:20
    at exports.MongoReply.MongoReply.parseBody (/uptime/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:132:5)
  name: 'MongoError',
  ok: 0,
  errmsg:
   'The \'cursor\' option is required, except for aggregate with the explain argument',
  code: 9,
  codeName: 'FailedToParse' }

I got this error on my other owned app and resolve it by updating aggregate functions to enforce them to use cursor. Is there any patch like this on this repo?

@ne0c0de
Copy link
Author

ne0c0de commented Aug 7, 2018

I resolved my problem by downgrading MongoDB to 3.0 version.

@keshrisohit
Copy link

works with mongo3.2 as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants