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

TypeError after reconnecting

    XMLWordPrintable

    Details

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

      Description

      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
      })
       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              officialerfanshield@gmail.com ERFANIUM N/A
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: