Registration of New Users - Unable to register and login

Tell us what’s happening:
User freeCodeCampTester attempted to log in.
MongoError: cannot do raw queries on admin in atlas

// running tests
Registering should work.
Login should work.
// tests completed

My database is linked to mongoDB, and no where in my code do i have “User freeCodeCampTester attempted to log in.” Please help me find out whats wrong with the test. Thank you

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Registration of New Users

Link to the challenge:

This error usually has to do with connecting to the database. There are a few troubleshooting steps:

  1. Make sure your URI is wrapped in quotes in the .env file. Something like this (note, I shortened the URI, yours will be longer):
  1. Make sure that your username and password are correct in the URI without any “<” or “>” symbols around them.

  2. Make sure you are calling the environment variable correctly: process.env.MONGO_URI

  3. If none of those things are causing the issue, using a different Node version usually fixes this error. When you create the connection string, choose version: 2.2.12 or later. Then paste the new string in the .env file and ensure steps 1-3 are right.

Hopefully one of these steps clears it up for you!