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

TypeError after reconnecting

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.5
    • Affects Version/s: 3.5.4
    • Component/s: None
    • Labels:
    • Environment:
      Node.js version: 13.5.0
      OS: elementaryOS 5.1 for Node.js and docker 18.09.9 for mongodb

      I created a simple node server to fetch some docs from MongoDB

      scenario:
      1. I'm shutting down the mongodb
      2. I'll send a request to node server.
      3. I'll restart the mongodb instantly
      4. After a few seconds, Most of the time this happens:

      {{ if (waitQueueMember[kCancelled]) {}}

      {{ ^}}
      TypeError: Cannot read property 'Symbol(cancelled)' of undefined
      {{ at processWaitQueue (/home/erfanium/Documents/miego/node_modules/mongodb/lib/core/sdam/topology.js:1001:24)}}
      {{ at NativeTopology.selectServer (/home/erfanium/Documents/miego/node_modules/mongodb/lib/core/sdam/topology.js:438:5)}}
      {{ at executeWithServerSelection (/home/erfanium/Documents/miego/node_modules/mongodb/lib/operations/execute_operation.js:137:12)}}
      {{ at executeOperation (/home/erfanium/Documents/miego/node_modules/mongodb/lib/operations/execute_operation.js:75:7)}}
      {{ at Cursor._initializeCursor (/home/erfanium/Documents/miego/node_modules/mongodb/lib/core/cursor.js:545:7)}}
      {{ at Cursor._initializeCursor (/home/erfanium/Documents/miego/node_modules/mongodb/lib/cursor.js:185:11)}}
      {{ at Object.callback (/home/erfanium/Documents/miego/node_modules/mongodb/lib/core/cursor.js:438:14)}}
      {{ at processWaitQueue (/home/erfanium/Documents/miego/node_modules/mongodb/lib/core/sdam/topology.js:1030:21)}}
      {{ at NativeTopology.serverUpdateHandler (/home/erfanium/Documents/miego/node_modules/mongodb/lib/core/sdam/topology.js:550:7)}}
      {{ at Server.emit (events.js:305:20)}}

      MongoClient Options:

       
      new mongodb.MongoClient('mongodb://localhost:27017', {
         useUnifiedTopology:true
      })
       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            officialerfanshield@gmail.com Erfan Safari
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: