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

Error - Cannot read properties of undefined (reading 'high_')

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 3.6.2
    • Component/s: None
    • 2
    • Not Needed
    • Not Needed

      What problem are you facing?

      Hi,
      I’ve encounter an issue while using bulkWrite method with a transaction session.
      My operations includes 2 documents insertion and 6 updates.
      When using the same operations without bulkWrite, everything works as expected.
      The error seems to be thrown from one of mongodb dependencies called “bson”.
      -
      Error:
      TypeError: Cannot read properties of undefined (reading 'high_')
      at Timestamp.equals (/usr/src/app/node_modules/mongodb/node_modules/bson/lib/bson/timestamp.js:236:31)
      at Timestamp.compare (/usr/src/app/node_modules/mongodb/node_modules/bson/lib/bson/timestamp.js:302:12)
      at Timestamp.greaterThan (/usr/src/app/node_modules/mongodb/node_modules/bson/lib/bson/timestamp.js:280:15)
      at mergeBatchResults (/usr/src/app/node_modules/mongodb/lib/bulk/common.js:423:27)
      at resultHandler (/usr/src/app/node_modules/mongodb/lib/bulk/common.js:516:25)
      at handler (/usr/src/app/node_modules/mongodb/lib/core/sdam/topology.js:942:24)
      at /usr/src/app/node_modules/mongodb/lib/cmap/connection_pool.js:350:13
      at handleOperationResult (/usr/src/app/node_modules/mongodb/lib/core/sdam/server.js:558:5)
      at commandResponseHandler (/usr/src/app/node_modules/mongodb/lib/core/wireprotocol/command.js:115:25)
      at operationDescription.cb (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:358:9)
      at MessageStream.messageHandler (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:277:5)
      at MessageStream.emit (node:events:390:28)
      at MessageStream.emit (node:domain:475:12)
      at processIncomingData (/usr/src/app/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
      at MessageStream._write (/usr/src/app/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
      at writeOrBuffer (node:internal/streams/writable:389:12)

      What driver and relevant dependency versions are you using?

      I’m using NodeJS driver with mongodb dependency version of “3.6.2”
      This mongo version uses “bson” dependency with version of “^1.1.6”.

      Steps to reproduce?

      It's not something that occurs all the time so I don't have a clear way on how to reproduce it.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            ofiraharoni617@gmail.com ofir aharoni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: