Exercise Tracker project

I’m working on my project and I’m getting this error: MongoServerError: bad auth : authentication failed
at Connection.onMessage (/home/runner/exercise-tracker-freecodecamp/node_modules/mongodb/lib/cmap/connection.js:227:30)
at MessageStream. (/home/runner/exercise-tracker-freecodecamp/node_modules/mongodb/lib/cmap/connection.js:60:60)
at MessageStream.emit (node:events:513:28)
at processIncomingData (/home/runner/exercise-tracker-freecodecamp/node_modules/mongodb/lib/cmap/message_stream.js:125:16)
at MessageStream._write (/home/runner/exercise-tracker-freecodecamp/node_modules/mongodb/lib/cmap/message_stream.js:33:9.
How do I fix the problem?

my project link: exercise-tracker-freecodecamp - Replit

That error typically means your database user does not have the necessary read/write permissions. Double check that you set the user up according to this article in the first challenges related to MongoDB and Mongoose.

Most times, it is just a bad username/password in the connection string. Make sure you are using the correct credentials and you didn’t include the <> part of the password placeholder.

Thanks very, very much, I appreciate.

Thank you too, lasjorg.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.