[COMPASS-4518] db.auth() does not work in Compass shell Created: 25/Nov/20  Updated: 29/Oct/23  Resolved: 18/Feb/21

Status: Closed
Project: Compass
Component/s: Embedded Shell
Affects Version/s: 1.23.0
Fix Version/s: 1.26.1

Type: Bug Priority: Major - P3
Reporter: Anna Henningsen Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2021-02-18 at 17.09.58.png     PNG File Screenshot from 2020-11-25 15-26-45.png    
Epic Link: COMPASS-3935
Documentation Changes: Not Needed

 Description   

db.auth(username, password) results in:

 
db.auth('root', 'somepasssword')
 [MongoParseError:|#] URI malformed, cannot be parsed
at parseConnectionString (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:269831:21) at connect (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:139038:3) at /home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:62583:5 at maybePromise (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:772:3) at MongoClient.connect (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:62579:10) at Function.MongoClient.connect (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:62802:22) at CompassServiceProvider._callee18$ (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:131963:46) at tryCatch (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:142634:40) at Generator.invoke [as _invoke] (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:142864:22) at Generator.next (/home/addaleax/src/compass/node_modules/@mongodb-js/compass-shell/lib/index.js:142689:21)

 


Generated at Wed Feb 07 22:36:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.