-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 5.0.1
-
Component/s: None
Using your example from here:
https://www.mongodb.com/docs/drivers/node/current/usage-examples/changeStream/
Results at the end of the program in an exception: (This also happens in my program)
closed the change stream
/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/operations/execute_operation.js:50
throw new error_1.MongoExpiredSessionError('Use of expired sessions is not permitted');
^
MongoExpiredSessionError: Use of expired sessions is not permitted
at executeOperationAsync (/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/operations/execute_operation.js:50:19)
at /home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/operations/execute_operation.js:12:45
at maybeCallback (/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/utils.js:288:21)
at executeOperation (/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/operations/execute_operation.js:12:38)
at cleanupCursor (/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/cursor/abstract_cursor.js:596:46)
at node:internal/util:375:7
at new Promise (<anonymous>)
at cleanupCursor (node:internal/util:361:12)
at ChangeStreamCursor.close (/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/cursor/abstract_cursor.js:255:15)
at ReadableCursorStream._destroy (/home/reiner/DATA/data/programm/JS/node_mongodb/node_modules/mongodb/lib/cursor/abstract_cursor.js:626:22) {
[Symbol(errorLabels)]: Set(0) {}
}
Node.js v18.14.0
- duplicates
-
NODE-5052 Closing change stream crashes the application
- Closed