-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Autocomplete, UI / UX
-
None
-
Iteration Athens
-
Not Needed
Problem Description
Received Tab completion error: MongoError: command listCollections requires authentication when trying to tab complete a command that doesn't require authentication
Steps to Reproduce
- Create a cluster and enable authentication
- Start mongosh
- Type db.is followed by TAB
Expected Results
It completes to db.isMaster
Actual Results
Enterprise [direct: mongos]> db.isTab completion error: MongoError: command listCollections requires authentication
at MessageStream.messageHandler (/usr/local/Cellar/mongosh/0.12.0/libexec/lib/node_modules/@mongosh/cli-repl/node_modules/mongodb/lib/cmap/connection.js:440:30)
at MessageStream.emit (events.js:315:20)
at MessageStream.EventEmitter.emit (domain.js:467:12)
at processIncomingData (/usr/local/Cellar/mongosh/0.12.0/libexec/lib/node_modules/@mongosh/cli-repl/node_modules/mongodb/lib/cmap/message_stream.js:107:16)
at MessageStream._write (/usr/local/Cellar/mongosh/0.12.0/libexec/lib/node_modules/@mongosh/cli-repl/node_modules/mongodb/lib/cmap/message_stream.js:27:9)
at writeOrBuffer (internal/streams/writable.js:358:12)
at MessageStream.Writable.write (internal/streams/writable.js:303:10)
at Socket.ondata (internal/streams/readable.js:719:22)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:467:12) {
ok: 0,
code: 13,
codeName: 'Unauthorized',
operationTime: Timestamp(1, 1619456122),
'$clusterTime': {
clusterTime: Timestamp(1, 1619456122),
signature: {
hash: Binary(Buffer.from("95829dd58334f88280c462962cf43f0f86c4d356", "hex"), 0),
keyId: Long("6954434199851892737")
}
}
}