Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5060

ChangeStream - Use of expired sessions is not permitted

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 5.0.1
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            reiner.proels@gmail.com Reiner Pröls
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: