question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught AssertionError upon connection

See original GitHub issue

Hey! 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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Enterisrcommented, Jan 15, 2021

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?

0reactions
sloorushcommented, Apr 9, 2021

This issue can be closed. @hviana

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found