Getting username cannot be null error while connecting to Mongo DB

tried giving username as additional connection options as well. Not working.
MongoVersion used is 3.6.9