-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.1.10
-
Component/s: None
-
Empty show more show less
I received the below stack trace from a change stream cursor. I believe it occurred because an error event was triggered on the cursor after close was requested (so the changeStream.cursor no longer exists).
I'm using driver 3.1.10 but tried the latest 3.1.12 and it is still present. As its a timing issue I'm struggling to recreate it consistently, however it might be to do with the close action taking some time and a change coming in while the cursor is closing.
Have marked as major for now because the stack is fully within mongodb node module making it tricky to catch and ignore in my own code.
Stack TypeError: Cannot read property 'options' of undefined
at processNewChange (node_modules\mongodb\lib\change_stream.js:372:39)
at Cursor.<anonymous> (node_modules\mongodb\lib\change_stream.js:272:5)
at Cursor.emit (events.js:182:13)
at next (node_modules\mongodb\lib\cursor.js:1013:14)
at err (node_modules\mongodb\lib\utils.js:415:14)
at executeCallback (node_modules\mongodb\lib\utils.js:404:25)
at handleCallback (node_modules\mongodb\lib\utils.js:128:55)
at cursor._next (node_modules\mongodb\lib\operations\cursor_ops.js:186:21)
at handleCallback (node_modules\mongodb-core\lib\cursor.js:203:5)
at node_modules\mongodb-core\lib\cursor.js:659:16
at queryCallback (node_modules\mongodb-core\lib\wireprotocol\3_2_support.js:280:21)
at node_modules\mongodb-core\lib\connection\pool.js:532:18
at process._tickCallback (internal/process/next_tick.js:61:11)