Back End Development and APIs Projects - Exercise Tracker failing tests

Whenever I post the link to my project in the “Solution Link” and hit “I’ve compelted my project” The last half of my tests fail.

But when I enter the link to the user logs myself, such as this one

Everything that’s supposed to appear under the log section shows up.

I tried adjusting CORS to allow access from all origins as suggested in another forum, but that didn’t work either. The console.log isn’t showing any issues either

Your project link(s)

solution: boilerplate-project-exercisetracker - Replit

Your browser information:

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

Challenge: Back End Development and APIs Projects - Exercise Tracker

Link to the challenge:

I’ve been having this exact same issue for days and spent so much time reading the docs, implementing solutions for CORS, reading other articles, etc. I’m totally stumped, too. It works for me locally or hosted on heroku or replit. But fails the logs part of the FCC submission every time. :woman_shrugging:

@Bl1xvan I forked your replit and when I submit the url, I fail the same tests you show. It appears the first test that fails is due to the following if statement evaluating to true when trying to save an exercise., data) => {
      if(err || !data){

I suggest adding console.log statements for err and data so you can see what is failing.

What happens if the an exercise is added without specifying a date? Remember, the date is optional but the user story explains how to handle this situation (that your app is not doing). Once you resolve this issue, you will pass all but the 2nd to last test.

1 Like

I am having the same issue! Manually running the GET logs works fine for me. But in FCC those tests fail and I see a ton of CORS errors. Waiting for someone to reply on here with a fix.

Update: Brian’s hint about the optional date is what I was missing!!

Who is this Brian person?

1 Like

my bad, I meant Randell!! Sorry, been staring at the code for too long. :sob: