Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning & mongoErrorContextSymbol errors when starting project on Mac #26

Closed
ysiddhapura opened this issue Feb 27, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ysiddhapura
Copy link
Contributor

ysiddhapura commented Feb 27, 2023

After entering the command 'npm start'
Getting these errors:
-DeprecationWarning: current Server Discovery and Monitoring engine is deprecated
-connection error MongoNetworkError: failed to connect to server [cluster0-shard-00-02-fy0po.mongodb.net:27017] on first connect [MongoNetworkError: connection 10 to cluster0-shard-00-02-fy0po.mongodb.net:27017 closed

  • Any debugging help with this issue would be appreciated.
@hardikpatil
Copy link
Contributor

same
Screenshot 2023-02-26 at 17 52 04

@kbuffardi
Copy link
Contributor

Note: quoting error messages as text is preferable since it is searchable, opposed to images.

That said, Google turned up some potential fixes. Start your exploration here and let us know of your updates: https://stackoverflow.com/questions/57895175/server-discovery-and-monitoring-engine-is-deprecated/57899638#57899638

@ysiddhapura ysiddhapura changed the title Potential Issue starting up Project on Mac | mongoErrorContextSymbol DeprecationWarning & mongoErrorContextSymbol errors when starting project on Mac Feb 27, 2023
@ysiddhapura
Copy link
Contributor Author

By adding 'useUnifiedTopology: true' to -> mongoose.connect(db, { useNewUrlParser: true, useUnifiedTopology: true }); in the files: app.js, sale.js and users.js resolved the initial DeprecationWarning and the initial MongoNetworkError.

Now able to load the home page.

mongoErrorContextSymbol error still persists, when navigating to the Register/Sign In pages.
The server closes with a
-connection error MongooseError [MongooseServerSelectionError]: connection to 52.54.19.162:27017 closed |
reason: TopologyDescription
type: 'ReplicaSetNoPrimary',
error: MongoNetworkError: connection to 52.54.19.162:27017 closed
[Symbol(mongoErrorContextSymbol)]

@kbuffardi kbuffardi added the bug Something isn't working label Feb 28, 2023
@shubhamlatkar shubhamlatkar self-assigned this Feb 28, 2023
@ysiddhapura ysiddhapura self-assigned this Feb 28, 2023
@abhilashSreenivasa abhilashSreenivasa self-assigned this Feb 28, 2023
@hardikpatil hardikpatil self-assigned this Feb 28, 2023
@SANDESHSOBARAD SANDESHSOBARAD self-assigned this Feb 28, 2023
@shubhamlatkar
Copy link
Contributor

I think the issue is with with mongo cluster as it was connecting to the mongo db atlas cluster of subhed from keys.js

mongodb+srv://subhed:Smart%[email protected]/

And subhed might have closed the read-write access to his cluster:

So I tried to fix it with docker containerised MongoDB Issue-fix

You can test the code using the docker:

Docker-compose

docker-compose up

Brower

  http://localhost:3000/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants