-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: 3.5.4
-
Component/s: None
-
Environment:Node.js version: 13.5.0
OS: elementaryOS 5.1 for Node.js and docker 18.09.9 for mongodb
-
Empty show more show less
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
})
- related to
-
NODE-2472 TypeError on server available with useUnifiedTopology: true
- Closed