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

Getting error about not being able to complete actions, even with the correct credientials.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 3.0.4
    • Component/s: MongoDB 3.4
    • Environment:
      node.js with mongodb from npm on windows server

      I'm getting this error: MongoError: user is not allowed to do action [find] on [testdb.$cmd]

      The issue is, I can connect to the database using mongo shell and it does everything I want just fine, but when I try it using node.js it always gives me that error when I connect to the database and try to do any actions. Here is the basic code I'm using to connect:

      var uri = 'mongodb+srv://cluster0-woivk.mongodb.net/testdb'
      MongoClient.connect(uri, {user: 'PaperDoom', password: 'TotallyNotReal'}, (err, db) => {
          if (err) console.log(err)
          //do stuff.
      })
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            kpobrien01@hotmail.com Kevin O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: