Describe your problem and how to reproduce it:
My project was done and made correctly, but because of the user story passing requirements i had to spend over 40 extra hours to pass this thing
Why? Because the test wanted the information in fcc's specific order even though I followed the example project and was identical to it, it wasn't passing because i had to magically guess the special order fcc wanted me to put the return json information in
same thing for the log, same thing for adding exercise info it was ridiculous
i had to play the guessing game to figure out what special order they wanted it in until finally after hours of googling someone showed the right order for the info to be displayed
Add a Link to the page with the problem:
https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/exercise-tracker
Recommended fix, suggestions (how would you update it?):
First off, according to the user stories, the sample project shown shouldn't pass by those standards because I followed the sample project exactly and had the same output results. But it didnt work, what I'm say is it isn't clear what you guys want in the requirements to pass.
THIS IS YOUR PROJECT'S OUTPUT: http://prntscr.com/syfaor
THIS IS MY PROJECT'S OUTPUT: http://prntscr.com/syfb7h
MY output passes, but when I followed the FCC Project output, it failed, I had my output exactly like your sample project output had it, that is for the /add exercises.
What drove me insane is, how was I supposed to guess the order you wanted that output in???
I got lucky and after a load of googling I found someone who had the same issue and showed the correct order to put the output in.
I had my project output the same as same project but it didn't work, post request part of my code, the output had to be something like username, description, duration, userId, date.
Something like that, but in the project sample version it was userid, description, duration, date, username, but that didn't work.
I literally finished the project 2 days ago but had to spend an extra 2 days troubleshooting only to come to the conclusion it had to be in some odd specific order that wasnt told to me.
I know I am coming off mad right now but I love your site and what you've done for me to help me learn, which is why I donate every month for you guys, its just this section in particular needs to be updated in my opinion.
Its outdated and glitch is horrible, it was down for like 1-2 days.
Also the code like I said it is outdated, not a huge deal since I was able to figure it out but annoying, and I mean this for the entire section, you constantly get deprecation warnings which I need to fix but its not a huge deal like I said, only annoying.
Also my main issue is just be more clear on what is wanted and needed to be done.
This talks about "app.route(path).get(handler).post(handler)" but it wasn't clear and only confused me, I didn't have to use app.route to pass at all so I didn't understand why it was there or how to exactly use this chain it just was confusing to me overall and not clear.
Also why put that there? Why not put that where it is supposed to be, which is here: https://www.freecodecamp.org/learn/apis-and-microservices/basic-node-and-express/get-data-from-post-requests
MongoDB/Mongoose section has these issues too, just overall.
_Main takeaways since my post became a messy one now:_
Don't just tell me to use stuff like app.route(path).get(handler).post(handler)
: https://www.freecodecamp.org/learn/apis-and-microservices/basic-node-and-express/get-query-parameter-input-from-the-client
Show me how to use this correctly, I was so confused, most of this section I had to Google and figure it out on my own, which is good for self reliance and troubleshooting, no doubt, these things helped my troubleshooting skills skyrocket but this was hair pulling.
https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/install-and-set-up-mongoose
This challenge had us setup a URI for mongo connection, I was so confused on why it wasn't working, it said replace the word "password" with your actual password so I had this
I can go on but I have passed the whole section and forgot a few things that had annoyed me, but the main takeaway is maybe dumb it down a bit for people like me who are pretty dumb LOL, It seems this section was a bit rushed with the challenge descriptions, they weren't detailed, but I've noticed this since the React section and on, I have gotten into the habit of watching video tutorials on the subject and then doing the FCC challenges so I fully get all the info because the FCC challenge descriptions aren't detailed enough like they were in HTML/CSS/Javascript.
Thanks for the write up @Symbolistic, the amount of detail will be a great help.
@Sky020 I know you've been looking at the backend challenges/projects in general, so I wondered if you had any thoughts on this.
@Symbolistic , Thank you, for your time to share this. Personally, I also struggled my way through the _Advanced Node and Express_ as well as the projects. Much like you, it came with the benefit of increasing my debugging skills.
The projects/challenges have become more difficult to complete over time due to:
@Sky020 I know you've been looking at the backend challenges/projects in general, so I wondered if you had any thoughts on this.
I am reworking the _Advanced Node and Express_ challenges, but have not touched the projects. So, I cannot say there will be fixes from me, anytime soon. Before moving much further, we need to discuss the platform to work on.
Hi @Symbolistic, thank you for taking the time to share all of these details. They will really help us improve the backend projects and challenges in their current state, and in the upcoming project based curriculum.
You're right that the output for the test project wouldn't pass the current tests. Last month I went through all of the projects with DBs and migrated them from mLab to Atlas, and tried to check that all the projects pass the current tests. I must have missed the /add
route for the exercise tracker while doing that.
I don't think the order of the keys/values in the response matters, but the test suite does check for _id
rather than userId
. I updated the example project so it now returns the correct response when adding an exercise. Hopefully that will prevent further confusion with this project. Still, lots of room for improvement like you mentioned.
@scissorsneedfoodtoo it looks like the /add
test still fails when pointed at https://nonstop-pond.glitch.me/
Thanks for the heads up @jonnangle. I made the changes last week but it seems like it wasn't saved. Glitch has had some problems with stability over the last couple of weeks, so maybe it had something to do with that?
I just made the changes again and tested it. Could you take a look and confirm https://nonstop-pond.glitch.me/ passes the /add
test?
Yeah, I had to give up on glitch and use ngrok
through to my laptop! All looks good now, thanks @scissorsneedfoodtoo!
Awesome! Thanks for confirming that @jonnangle. Hopefully things with Glitch improve soon.
Hi @scissorsneedfoodtoo, I encountered the same issues as @Symbolistic. I spent 4 days trying to guess the fields that the test software wanted. I eventually found them by testing the example application, however the test number 5 (ie log without filters) does not pass. I realized that the verification software was not doing it.
Screenshots
Validation
console.log's with called endpoints and sent data
Hi @eoamegassi, thanks for your patience. All of this backend projects need some updates, whether that's to the installed packages or the instructions themselves. While we encourage people to use the example application to test the endpoints, we can be more explicit about the responses our test suite expects.
Could you post a link to your project for us to take a look at?
Hello @scissorsneedfoodtoo, thank you for your answer. I finally managed to work around this problem.
Before I got all the data from the database before doing a javascript filter on it. Now, I make the filter directly at the database level with the query Model.find(). In the end I return the same result but now it performs the test.
I think this may be a problem with the async / await in the test script.
Here is the link to my project https://glitch.com/~konaesan-exercise-tracker
@eoamegassi, thanks for sharing your project and glad to hear that you were able to pass that test.
It's hard to say whether or not filtering later with JavaScript would work without seeing your code, though I imagine it would be fine. The fifth test only checks that there's an array called log, and that there's one object inside. It's pretty forgiving outside of that.
But again, I think we could be more explicit with the type of responses we expect. We might consider updating the README.md files in these projects with the user stories and some examples of the routes, query parameters, and expected responses.
Hi @scissorsneedfoodtoo @Sky020, thanks for working on these backend challenges. I struggled with the Exercise Tracker too. I also tried to guess the correct output required for the exercise log. Looking at the test, though, it appears to be a problem with setting up the log in the database before the log route is tested. There's a missing date parameter. I submitted a pull request if you have time to take a look. https://github.com/freeCodeCamp/freeCodeCamp/pull/39266
@Symbolistic In the screenshots provided, the keys are not the same (ie - FCC's userId
vs your _id
keys). Were those eventually updated?
I'm currently having the same issue where all tests are failing (except for providing a link), though the output appears as though it should pass, for example, my failing output:
compared to @eoamegassi's working output:
(I've also tried leaving in the versionKey
and it also fails). https://nonstop-pond.glitch.me/ has been taken down, so there's very little I can work with to compare my results.
@richardtorres314, the screenshots you posted look correct. The ones from the original poster were due to a bug I accidentally introduced to the Glitch example while updating the project to work with Mongo Atlas rather than MLab. It was fixed a little while ago.
Also, the example at https://nonstop-pond.glitch.me/ should be working again. You should be able to visit https://nonstop-pond.glitch.me/api/exercise/users and see the output.
Could you post a link to your project so we can take a look?
@scissorsneedfoodtoo I found my issue, it was a cors problem (tried to use hapi framework instead of express to complete the project and found issues with setting the cors header so eventually switched over to express). The output passed the tests and the challenge completed successfully! Currently moved over to the "File Metadata Microservice" project, but that sample project link (https://purple-paladin.glitch.me/) is still down at the moment.
@scissorsneedfoodtoo I see that https://purple-paladin.glitch.me/ has been updated and is now up. Thanks!
@Symbolistic, thanks for taking the time to to document. I found myself in the same state of frustration and wasted a lot of time, but was too strung out to write it up! I still haven't managed to get everything passing but will continue working on it. I suppose the good thing is it probably (unintentionally) gives us a taste for what a real world project feels like, however it shouldn't be done this way.
Most helpful comment
Hi @scissorsneedfoodtoo, I encountered the same issues as @Symbolistic. I spent 4 days trying to guess the fields that the test software wanted. I eventually found them by testing the example application, however the test number 5 (ie log without filters) does not pass. I realized that the verification software was not doing it.
Screenshots
Validation
console.log's with called endpoints and sent data