Anonymous Message Board working excellent on localhost but not passing some tests with replit

Hello,
I wrote code for Anonymous Message Board in my vscode and it passed all the tests, however, when I uploaded it on GitHub and then on Replit I imported it from GitHub which means that code is 100% same it fails some tests. POST requests, one DELETE and one PUT request to be exact. why that could happen?
maybe it’s not a problem with FreeCodeCamp but still I would be glad if you helped me to solve this problem.

It would help if you posted a link to your code and Replit.

1 Like

Sorry for late response,
GitHub link: GitHub - sanarskiluka/anonymous-message-board
REPLIT link: https://replit.com/@LukaSanarski1/anonymous-message-board#.replit

when I import from github locally on my computer it passes all tests but when I import from github on replit it fails some tests

P.S don’t pay attention to my functional tests for now xD

Just a reminder, If you have time please can you check this? or anyone else?

Edit: OK I’m just blind, sorry. You need to change your protocol in routes\api.js to HTTPS.

Edit2: There are still tests failing even with the change. On the first run, the second DELETE request fails then if I run it again the two POST requests fail as well. I can’t really look into this right now.


I’m seeing CORS errors in the console. Not really sure what is going on but some of the requests are being made to http and not https.

I tested it on both Replit and Glitch with the same result.

I didn’t look into it much and I don’t really know the test code for this project. I might open an issue to see if others have any idea about what is going on.


BTW, I think you also will want to update the code in routes\fcctesting.js with the code from this PR.

1 Like

It helped to pass some tests. Now only one Delete request (for api/replies/{board}) is not passing but I think I can handle that myself.

Hey I’ve been having trouble with the delete request, did you manage to pass it?

Not yet, mine is working properly but still doesn’t pass the test
Do you have the same problem?

If it were not working well it would be easy to find a mistake but now I have no idea

Nah I haven’t been able to pass that specific delete request and both put requests. Apologies for the late response.

No problem, for PUT requests you can see my code and compare to yours, but I still can’t pass DELETE request. Actually, I have not been trying cause now that is just wasting time.

Ok cool. I’ll see if I find any solutions for the delete requests and get back to you.

1 Like

Hey did you manage to solve the delete request yet?

no, I moved on to other projects cause I think that failing test is fault of FreeCodeCamp’s testing because actually that’s working perfectly. So I will not spend time on that.