All tests are passing on Replit but not a single one is getting passed on freecodecamp

I’ve added MongoDB connection string and NODE_ENV to test but still not able to pass a single test case on freecodecamp though all 10 tests are getting passed on replit.

@BenGitter @sanity Getting same error again, even tried clearing the cache. Could you please help me with this.

Are you getting any errors in the replit console after submitting project on the freeCodeCamp project page? From the brief look I had, I suspect one of the tests request is resulting in error that’s crashing the project.

When I submit your project link on fcc it passes all the tests.

Just to be sure, you are submitting
Have you tried restarting the replit project and then directly submitting the link on fcc?
Or maybe you can try a different browser?

Which browser are you using for the same ?

Not a single error on replit

I am using Firefox, but most browsers should work. It is just to check if the issue is browser related. Also, you can try incognito mode (without signing in to fcc) and see if you can successfully submit your project.

Did you try checking the browser console and network tab on the fCC submit page when submitting?

This no longer works for me. For some reason the app becomes unresponsive after running the tests. From what I could find it seems to be an issue with Mongoose. Downgrading Mongoose to version 5.11.x fixed the issue for me.

In package.json:

"mongoose": "~5.11.0"

I tried Downgrading Mongoose to version 5.11.x and even tried different browser(edge and firefox), same issue persists.

I’ve spend some time tinkering with fork of the code. Some findings:

  • Once project is responsive after running internal functional tests, it can be submitted any number of times and it will work fine during that run.
  • To have it responsive after tests it may need to be started and stopped multiple times.
  • Having all functional tests commented out stops issues with stability.
  • Any functional test not commented out (including the example as the only not commented out) and it’s back to crashing often after running tests.

Really not sure what to make out of this.

1 Like

I tried what you said, starting and stopping multiple times and it fixed the problem.
But I still want to know what’s causing the issue.

Yeah, that’s more a really cumbersome workaround rather than solution.

I didn’t get much deeper with trying to figure out reason. There’s nothing explicit, no errors, node process actually seems to be still working. Comparing node and express debug logs between working and not working run doesn’t give anything obvious.

Okay, no problem. I totally understand your point.

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