Ocasionally different queries fail with exception “[cause]: BSONError: BSON element “cursor” is missing”
Here is stacktrace of exception:
at async model.Query.exec (/app/node_modules/mongoose/lib/query.js:4438:63)
at async model.Query._findOne (/app/node_modules/mongoose/lib/query.js:2643:15)
at async Collection.findOne (/app/node_modules/mongodb/lib/collection.js:277:21)
at async FindCursor.next (/app/node_modules/mongodb/lib/cursor/abstract_cursor.js:323:17)
at async FindCursor.fetchBatch (/app/node_modules/mongodb/lib/cursor/abstract_cursor.js:641:13)
at async FindCursor.cursorInit (/app/node_modules/mongodb/lib/cursor/abstract_cursor.js:607:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at FindCursor._initialize (/app/node_modules/mongodb/lib/cursor/find_cursor.js:62:37)
at get batchSize (/app/node_modules/mongodb/lib/cmap/wire_protocol/responses.js:211:21)
at get batch (/app/node_modules/mongodb/lib/cmap/wire_protocol/responses.js:201:29)
at get cursor (/app/node_modules/mongodb/lib/cmap/wire_protocol/responses.js:165:21)
at CursorResponse.get (/app/node_modules/mongodb/lib/cmap/wire_protocol/responses.js:45:26)
at CursorResponse.get (/app/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js:171:23)
I’m using Atlas dbaas
Any ideas what could be wrong?
Node Driver “version”: “6.15.0”
Mongoose “version”: “8.13.0”