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.
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.
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.
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.
hello devs…has anybody fixed the delete request yet? what is fcc’s stance on this?
Hey still no progress. I dont know if FCC knows about the tests not being able to pass
The demo project is passing all the tests so I don’t see it being an issue with the tests.
FYI, to see the demo project pass the last test (the 10 Functional Tests) you have to clone it down and set up the .env file correctly. But other than that you can see it passing by just submitting the demo project (again, all but the Functional Tests will pass).
Which of the two delete tests is failing for you?
EDIT:
HTTPS
protocol inredirection url
make all tests pass EXCEPT final test (functional tests).HTTP
protocol inredirection url
ONLY makes final test (functional tests) pass.
After spending several hours researching, when I saw your statement I had an “eureka” moment and finally found the solution for a weird error I was having.
For those who are having this
error
thrown after trying to run your own-built Chai functional tests :
Error: write EPROTO 140697044801472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:33
For the final test to pass (Functional Tests),
HTTP
protocol has to be set for any redirecting url in routes\api.js
.
P.S.: Since I did not find any topic talking about it, I thought it would be useful to write it here.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.