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
MongoDB error when adding the async cursor option to aggregate query #4101
Comments
This issue is still coming while using MongoDB 3.6 on server. I get the following error when asking questions : "Command failed with error 9: 'The 'cursor' option is required, except for aggregate with the explain argument' on server 127.0.0.1:28001. The full response is { "ok" : 0.0, "errmsg" : "The 'cursor' option is required, except for aggregate with the explain argument", "code" : 9, "codeName" : "FailedToParse" }" |
This issue re-surfaced when we've migrated to MongoDB 3.6 |
@rturk @bestphoneappsdev code samples please? |
same problem here.. when i update to mongo v 3.6 |
same here, my code:
using mongodb 3.6 |
I get alike error on PHP after upgrading to mongodb 3.6 (from 3.4) |
@vkarpov15 fixed after I've upgraded to the latest Mongoose version |
@raoulwissink looks like its fixed in the newer versions of Mongoose |
@rturk what version of mongoose did you upgrade to? 4.13.8 or 5.0.0-rc0? |
@vkarpov15 4.13.7 |
@rturk can we close this one out then? |
@varunjayaraman for my case yes. |
Hello! I know this issue is closed, but I was wondering what the root cause was. I have run into the same problem, and upgrading fixed it, but I was hoping to know what the underlying issue was. I did not see a relevant commit attached to this issue. |
@sjohnson540 can you show the code that's causing this issue? This issue shouldn't show up in newer versions of mongoose, the issue was that the |
Turns out with latest Mongo DB, nodejs fails when client load is triggered. The symptom: client fails load with following error: Fatal error-No more IDs available. Aborting Root cause: Node server fails with following error: ```{ MongoError: The 'cursor' option is required, except for aggregate with the explain argument at Function.MongoError.create (/home/nodeuser/Node-DC-EIS-cluster/node_modules/mongodb-core/lib/error.js:31:11) at commandCallback (/home/nodeuser/Node-DC-EIS-cluster/node_modules/mongodb-core/lib/topologies/server.js:1154:66) at Callbacks.emit (/home/nodeuser/Node-DC-EIS-cluster/node_modules/mongodb-core/lib/topologies/server.js:119:3) at Connection.messageHandler (/home/nodeuser/Node-DC-EIS-cluster/node_modules/mongodb-core/lib/topologies/server.js:295:23) at Socket.<anonymous> (/home/nodeuser/Node-DC-EIS-cluster/node_modules/mongodb-core/lib/connection/connection.js:285:22) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:547:20) name: 'MongoError', message: 'The \'cursor\' option is required, except for aggregate with the explain argument', ok: 0, errmsg: 'The \'cursor\' option is required, except for aggregate with the explain argument', code: 9, codeName: 'FailedToParse' }``` this is described in Mongoose issue: Automattic/mongoose#4101 Solution: update to latest of that release (4.12.13) - problem is gone, no Node errors and client load runs smooth.
We have upgraded mongodb to 3.6.3 and one of the aggregations return this error when called from UI. It was working fine with 3.4.1. I don't know how to resolve it. Please help. |
Please find the code: { |
When adding the
async
cursor option I get the following error:The (simplified) query:
If I make this modification the error goes away:
My setup:
The text was updated successfully, but these errors were encountered: