Can't Pass Challenge: Create and Save Record of a Model: Mongoose and MongoDB

My tests continually fail, even if I copy from the solution link. The tests says things like: Test Timed Out when I am still running the code from Replit. Help please! Thanks in advance!

Your project link(s)


Your browser information:

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

Challenge: Create and Save a Record of a Model

Link to the challenge:

1 Like

The test passes when I fork your project and use my own DB. Make sure you are connecting to the DB. You can try adding some logs to it.

mongoose.connect(process.env['MONGO_URI'], { useNewUrlParser: true, useUnifiedTopology: true })
  .then(() => console.log('MongoDB connected...'))
  .catch(err => console.log(err));

mongoose.connection.on('error', (err) => console.log('connection error', err));

I have tried and seen that my cluster is connected to my repl, but my tests are still not passing. The tests still time out when my reply is still running, but it doesn’t when my repl is inactive.

Check the network tab and look for errors when you submit.

Sometimes if you fork your own project it can fix issues.

Otherwise, you can try using Glitch or coding it locally and submitting http://localhost:3000

So, nothing has worked. I have been trying and trying again. I appeal to freeCodeCamp. Fix this please.

freeCodeCamp isn’t the problem so there is nothing for us to fix. As I said, your code is passing for me with my own DB.

Again if Replit isn’t working for you, try using Glitch, or run it locally.

I fixed this issue by fixing a typo. I used


instead of


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