Uncaught AssertionError upon connection
See original GitHub issueHey! I tried to run this code
const client = new MongoClient();
await client.connect(CONFIG.MONGO_URI);
const db = client.database(this.DBName);
this.Collection = db.collection<IRow>(this.CollectionName);
with the MONGO_URI config var in the form of this uri (with my password and dbname of course)
mongodb://atlas_admin:<password>@cluster0-shard-00-00.wypab.mongodb.net:27017,cluster0-shard-00-01.wypab.mongodb.net:27017,cluster0-shard-00-02.wypab.mongodb.net:27017/<dbname>?ssl=true&replicaSet=atlas-ho4gol-shard-0&authSource=admin&retryWrites=true&w=majority
But it keeps erroring out with this AssertionError. I should also mention this is an atlas db - https://cloud.mongodb.com/
Edit: the new form of the uri the
mongodb+srv://
does not work either, throwing “No such host is known. (os error 11001)”
Thank you 😊
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Mocha uncaught assertion error status response ...
ECONNREFUSED is pretty clear, your server isn't running. That's because you've supplied the url as a string, not the express instance.
Read more >Uncaught exception: AssertionError [ERR_ASSERTION] #43
In function onConnect you use assert.equal(head.length,0). If assertion fails, it leads to uncaught process exception.
Read more >OpenLayers v7.2.2 API - Class: AssertionError
Error object thrown when an assertion failed. This is an ECMA-262 Error, extended with a code property. See https://developer.mozilla.org/en-US/docs ...
Read more >AssertionError 25 on getExtent, Openlayers?
The link doesn't work in version 5.3.3 so here is the 5.3.0 ... to open the view at a arbitrary setting then fit...
Read more >AssertionError - Manual - PHP
AssertionError is thrown when an assertion made via assert() fails. Class synopsis ¶. class AssertionError extends Error {. /* Inherited properties */.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If I’m not wrong, the meaning of this is that you couldn’t to an cloud DB providers such as atlas right now. I am correct?
This issue can be closed. @hviana