I have an application which works on one computer, and now it will not work on another computer. This application is created within Qt, and it works seamlessly on the original computer. I tried to package it and download it on a new computer, and I saw issues, once I would attempt to read/write from the database.
The code I have is here
// Fields for mongo
mongocxx::instance inst{};
const mongocxx::uri uri = mongocxx::uri{"uriStringValue"};
mongocxx::client conn{uri};
mongocxx::database db = conn["DB"];
mongocxx::collection col = db["Col1"];
bsoncxx::document::view_or_value docValue = bsoncxx::builder::basic::make_document(
bsoncxx::builder::basic::kvp("test1", "value1"),
bsoncxx::builder::basic::kvp("test2", "value2"),
bsoncxx::builder::basic::kvp("test3", "value3"),
bsoncxx::builder::basic::kvp("test4", "value4"));
try {
col.insert_one(docValue);
}
catch(std::exception &e) {
std::cout << e.what();
}
This code is within a slot which is triggered when the button is clicked. When I click said button, and the code runs, I receive this error from the std::cout
No suitable servers found (`serverSelectionTryOnce` set): [Failed to initialize security context, error code: 0x80090330: The specified file could not be decrypted.
calling hello on 'ac-bcpkf5n-shard-00-00.9ct5wat.mongodb.net:27017'] [Failed to initialize security context, error code: 0x80090330: The specified file could not be decrypted.
calling hello on 'ac-bcpkf5n-shard-00-01.9ct5wat.mongodb.net:27017'] [Failed to initialize security context, error code: 0x80090330: The specified file could : generic server error