-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 6.6.0
-
Component/s: None
import { MongoClient } from 'mongodb'; const client = await MongoClient.connect('mongodb://localhost:27017/'); const result = await client.db('test').collection('test').aggregate([], { raw: true }).toArray(); console.log(result); await client.close();
works fine in 6.5.0, throws in 6.6.0
$ node test.mjs /private/tmp/node_modules/mongodb/lib/utils.js:573 for (const value of iterable) { ^ TypeError: iterable is not iterable at List.pushMany (/private/tmp/node_modules/mongodb/lib/utils.js:573:29) at [kInit] (/private/tmp/node_modules/mongodb/lib/cursor/abstract_cursor.js:483:34) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async next (/private/tmp/node_modules/mongodb/lib/cursor/abstract_cursor.js:520:13) at async AggregationCursor.next (/private/tmp/node_modules/mongodb/lib/cursor/abstract_cursor.js:237:16) at async [Symbol.asyncIterator] (/private/tmp/node_modules/mongodb/lib/cursor/abstract_cursor.js:162:34) at async AggregationCursor.toArray (/private/tmp/node_modules/mongodb/lib/cursor/abstract_cursor.js:280:26) at async file:///private/tmp/test.mjs:4:16 Node.js v20.13.1
Use Case
As a... driver user
I want... the driver to not throw exceptions in normal usage
So that... I can update to the latest patch release of the driver
User Impact
No idea. This was caught by Compass's tests.
Dependencies
Can work around this on our side, so N/A.
Unknowns
- questions that need to be answered to determine implementation
Acceptance Criteria
Implementation Requirements
- functional reqs, potential snafus to avoid, performance targets, etc
Testing Requirements
- unit test, spec test sync, etc
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc
- is fixed by
-
NODE-6136 Use CursorResponse for all cursors
- Closed