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

ObjectID is no longer serializable

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.18
    • Affects Version/s: 2.2.16
    • Component/s: BSON
    • Environment:
      Nodejs 6.9.1

      On node driver version 2.2.16 and 2.2.17 there is a bug when you try to serialize an ObjectID.
      For some reason, when you try to print an ObjectID to console the `console.log` method calls the toString method of ObjectID with a number. This number represents the recursion number of the internals of the console.log buffer. As a result, ObjectID tries to serialize the id using a wrong encoding name.
      This is breaking all my projects because being able to output to console is quite important.
      This was not happening on version 2.1.10, I didn not tested versions in between (2.2.11, 2.2.12, etc)

      Regards

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            danielo@caseonit.com Daniel Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: