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

Error in callback functions write operation acknowledgment is disabled

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.34
    • Affects Version/s: 2.0.31, 2.0.33
    • Component/s: None
    • Environment:
      > db.version() >> 2.4.11

      > npm list mongodb >> mongodb@2.0.31

      /////// sample program uses insertOne operation with write ack disabled
      > node
      > var command = function(err, db) {
      var writeOptions =

      {w:0, j:false}

      ;
      db.collection('test').insertOne(

      {style:'xxx'}

      , writeOptions, function(err, r)

      { if(err) console.log('%j',err.stack); }

      );
      db.close();
      };
      > var MongoClient = require('mongodb').MongoClient;
      > MongoClient.connect('mongodb://', command);
      >> TypeError: Cannot read property 'result' of null
      at \node_modules\mongodb\lib\collection.js:348:24
      at handleCallback (\node_modules\mongodb\lib\utils.js:95:12)
      at \node_modules\mongodb\lib\collection.js:496:31
      at \node_modules\mongodb\node_modules\mongodb-core\lib\topologies\replset.js:371:5
      at bound (domain.js:254:14)
      at runBound (domain.js:267:12)
      at executeUnordered (\node_modules\mongodb\node_modules\mongodb-core\lib\wireprotocol\2_4_su
      pport.js:510:5)
      at LegacySupport.insert (\node_modules\mongodb\node_modules\mongodb-core\lib\wireprotocol\2_
      4_support.js:41:12)
      at Server.insert (\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\server.js:9
      05:37)
      at executeWriteOperation (\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\rep
      lset.js:367:13)

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            cheekyiscool Ankit Patel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: