MongoDB Charts - Add-user command error: An error occurred authenticating

@tomhollander, thanks a lot for your help I deleted app, auth, metadata and config databases. Then tried with the simplest connection URI. After 7 attempts it finally connected to Stitch and its working now.

Logs:

➜ mongodb-charts docker exec -it $(docker container ls --filter name=_charts -q) cat /mongodb-charts/logs/charts-cli.log

2020-07-22T15:44:26.708+00:00 INFO  called charts-cli startup with arguments {"_":["startup"],"debug":false,"help":false,"version":false,"with-test-facilities":false,"withTestFacilities":false,"d":"/mongodb-charts","directory":"/mongodb-charts","$0":"mongodb-charts/bin/charts-cli.js"} 
2020-07-22T15:44:26.712+00:00 INFO  parsedArgs task success  
2020-07-22T15:44:26.714+00:00 INFO  installDir task success ('/mongodb-charts') 
2020-07-22T15:44:26.714+00:00 INFO  log task success  
2020-07-22T15:44:26.714+00:00 INFO  salt task success  
2020-07-22T15:44:26.715+00:00 INFO  productNameAndVersion task success ({ productName: 'MongoDB Charts Frontend', version: '1.9.1' }) 
2020-07-22T15:44:26.715+00:00 INFO  gitHash task success ('1a46f17f') 
2020-07-22T15:44:26.715+00:00 INFO  supportWidgetAndMetrics task success ('off') 
2020-07-22T15:44:26.715+00:00 INFO  tileServer task success (undefined) 
2020-07-22T15:44:26.716+00:00 INFO  tileAttributionMessage task success (undefined) 
2020-07-22T15:44:26.716+00:00 INFO  rawFeatureFlags task success (undefined) 
2020-07-22T15:44:26.719+00:00 INFO  stitchMigrationsLog task success ({ completedStitchMigrations: [] }) 
2020-07-22T15:44:26.719+00:00 INFO  featureFlags task success ({}) 
2020-07-22T15:44:26.725+00:00 INFO  lastAppJson task success ({}) 
2020-07-22T15:44:26.725+00:00 INFO  existingInstallation task success (false) 
2020-07-22T15:44:26.726+00:00 INFO  tenantId task success ('a47f2a2f-f3a6-4496-a413-036d9883b861') 
2020-07-22T15:44:26.727+00:00 INFO  chartsMongoDBUri task success  
2020-07-22T15:44:26.728+00:00 INFO  tokens task success  
2020-07-22T15:44:26.729+00:00 INFO  encryptionKeyPath task success  
2020-07-22T15:44:26.729+00:00 INFO  stitchConfigTemplate task success  
2020-07-22T15:44:26.730+00:00 INFO  libMongoIsInPath task success (true) 
2020-07-22T15:44:26.829+00:00 INFO  waiting for MongoDB, attempt #1 to connect to MongoDB at mongodb://user:*******@host:27017/DB?replicaSet=rd0&authSource=admin. 
2020-07-22T15:44:27.117+00:00 INFO  waiting for MongoDB, successfully connected to MongoDB at mongodb://user:*******@host:27017/DB?replicaSet=rd0&authSource=admin after 1 attempts. 
2020-07-22T15:44:27.119+00:00 INFO  mongoDBReachable task success (true) 
2020-07-22T15:44:27.124+00:00 INFO  stitchMigrationsExecuted task success ([ 'stitch-1332',  'stitch-1897',  'stitch-2041',  'migrateStitchProductFlag',  'stitch-2041-local',  'stitch-2046-local',  'stitch-2055',  'multiregion',  'dropStitchLogLogIndexStarted' ]) 
2020-07-22T15:44:27.373+00:00 INFO  minimumVersionRequirement task success (true) 
2020-07-22T15:44:27.376+00:00 INFO  stitchConfig task success  
2020-07-22T15:44:27.378+00:00 INFO  stitchConfigWritten task success (true) 
2020-07-22T15:44:27.385+00:00 INFO  stitchChildProcess task success  
2020-07-22T15:44:27.485+00:00 INFO  waiting for Stitch to start, attempt #1 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:27.490+00:00 WARN  waiting for Stitch to start, attempt #1 failed: connect ECONNREFUSED 127.0.0.1:8080 
2020-07-22T15:44:27.590+00:00 INFO  waiting for Stitch to start, attempt #2 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:27.591+00:00 WARN  waiting for Stitch to start, attempt #2 failed: connect ECONNREFUSED 127.0.0.1:8080 
2020-07-22T15:44:27.791+00:00 INFO  waiting for Stitch to start, attempt #3 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:27.792+00:00 WARN  waiting for Stitch to start, attempt #3 failed: connect ECONNREFUSED 127.0.0.1:8080 
2020-07-22T15:44:27.976+00:00 INFO  indexesCreated task success (true) 
2020-07-22T15:44:28.095+00:00 INFO  waiting for Stitch to start, attempt #4 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:28.096+00:00 WARN  waiting for Stitch to start, attempt #4 failed: connect ECONNREFUSED 127.0.0.1:8080 
2020-07-22T15:44:28.598+00:00 INFO  waiting for Stitch to start, attempt #5 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:28.599+00:00 WARN  waiting for Stitch to start, attempt #5 failed: connect ECONNREFUSED 127.0.0.1:8080 
2020-07-22T15:44:29.399+00:00 INFO  waiting for Stitch to start, attempt #6 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:29.400+00:00 WARN  waiting for Stitch to start, attempt #6 failed: connect ECONNREFUSED 127.0.0.1:8080 
2020-07-22T15:44:30.703+00:00 INFO  waiting for Stitch to start, attempt #7 to connect to Stitch server at http://localhost:8080. 
2020-07-22T15:44:31.383+00:00 INFO  waiting for Stitch to start, successfully connected to Stitch at http://localhost:8080 after 7 attempts. 
2020-07-22T15:44:31.383+00:00 INFO  stitchServerRunning task success (true) 

I will now try adding more details to connection URL.

Thank you for your time. Appreciate your help.