Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't submit backend project #37381

Closed
ojeytonwilliams opened this issue Oct 17, 2019 · 13 comments · Fixed by #37498
Closed

Can't submit backend project #37381

ojeytonwilliams opened this issue Oct 17, 2019 · 13 comments · Fixed by #37498
Assignees
Labels
platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. type: showstopper Issues that are urgent and are critical path. These need immediate attention & shipping.

Comments

@ojeytonwilliams
Copy link
Contributor

ojeytonwilliams commented Oct 17, 2019

For those of you reaching here from forum:

We have fixed this issue and it live on freecodecamp.org/learn. Please go ahead and submit links to your solution and GitHub again and it should work now.

If you see any 403 in the browser console that is fine and will clear itself. You can safely ignore them. Those are the past updates which will resolve as you submit valid solution URLs.

Thanks for your patience with this fix.


Original issue:

Describe the bug
When a backend project is submitted it does not send the solution or Github urls and is rejected, silently, by the server.

Original issue details:

To Reproduce
Steps to reproduce the behavior:

  1. Go to localhost:8000/learn/apis-and-microservices/apis-and-microservices-projects/exercise-tracker
  2. Enter valid urls into Solution and Github Link
  3. Click "I've completed this challenge"
  4. Click "Submit..."
  5. Arrive at the next challenge
  6. Go to your public profile (with timeline public)
  7. Reload
  8. See that the project does not appear.

Expected behavior
Either the submission should succeed or the user should be informed that it has failed.

@ojeytonwilliams ojeytonwilliams added type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. release: next/beta labels Oct 17, 2019
@raisedadead raisedadead added release: production help wanted Open for all. You do not need permission to work on these. and removed release: next/beta labels Oct 17, 2019
@ojeytonwilliams
Copy link
Contributor Author

I was wrong about the 'silently' part. On the .dev site you can see that there is, briefly, a message warning you that the server is not being updated
SubmissionDev, but that gets wiped out when the new page loads.

@raisedadead
Copy link
Member

Can you re-confirm this. I just want to rule out our earlier outage, and that we need to update the template on boilerplate with the api.freecodecamp.org as a CORS allowed origin. I think a recent issue came up about this, @RandellDawson can you help in digging through the issues on what it was and if it is related.

@ahmaxed
Copy link
Member

ahmaxed commented Oct 20, 2019

I can reproduce this on the current master and on production.

@scissorsneedfoodtoo
Copy link
Contributor

@raisedadead, I can take a look at the example projects and boilerplates to make sure api.freecodecamp.org is allowed as an origin.

@raisedadead
Copy link
Member

Yup, @scissorsneedfoodtoo please test one of the projects and see if it works, which may mean we needing to do something fancy about these.

@scissorsneedfoodtoo
Copy link
Contributor

@raisedadead, I've checked a few projects and those that have CORS settings all have app.use(cors({origin: '*'}));. I've tried explicitly allowing api.freecodecamp.org and disabling Helmet and CORS wherever possible, but still get the same error.

@raisedadead
Copy link
Member

Okay, need to investigate then.

@ojeytonwilliams
Copy link
Contributor Author

I think the forms may not be sending the URLs in the first place. Well, the server is complaining because it isn't getting them.

@alex-parra
Copy link
Contributor

Hi everyone!
I've been facing this for about a week or so. Tested yesterday and today (just now) and it's still the same.
For me it's at submitting the Issue Tracker project.
Tests pass but after clicking Submit and go to next project, the request to https://api.freecodecamp.org/internal/project-completed fails with status 403, body is just 'Forbidden' and payload has only {id: "587d8249367417b2b2512c42", challengeType: 4}.
For the full request output (headers, etc) see
api_freecodecamp_project-completed.txt

Best.

@freeCodeCamp freeCodeCamp locked as too heated and limited conversation to collaborators Oct 22, 2019
@raisedadead raisedadead added the type: showstopper Issues that are urgent and are critical path. These need immediate attention & shipping. label Oct 22, 2019
@freeCodeCamp freeCodeCamp unlocked this conversation Oct 22, 2019
@raisedadead raisedadead self-assigned this Oct 23, 2019
@raisedadead raisedadead removed the help wanted Open for all. You do not need permission to work on these. label Oct 23, 2019
@raisedadead raisedadead pinned this issue Oct 23, 2019
@raisedadead
Copy link
Member

@ojeytonwilliams you were correct.

Contributors,

The forms are not sending the links to the API and the validation checks on the API reject the calls as 403

I have created a PR which will send a json response to make this less cryptic on the XHR response. Doesn't fix the issue, but better for debugging.

Now, coming to the client:

  1. We need to look into the redux wiring and understand why its not sending out the links to the API as it should.
  2. We need to fix the learn (possibly in the layout) or somewhere else to show the messages received from API as Flash.

The later can some as a separate pull-request.

@ahmaxed
Copy link
Member

ahmaxed commented Oct 24, 2019

we are on it.

@moT01 moT01 changed the title Backend project submission fails quietly Can't submit backend project Oct 27, 2019
@kelsiegosser
Copy link

kelsiegosser commented Oct 28, 2019

I am still experiencing this issue when trying to submit my projects. Would you like for me to open a new issue?

Edit: Here are some pics of my console for accessing site, going to current challenge, and then submitting the challenge:
image
image

@raisedadead
Copy link
Member

Hi Kelsie,

Thanks for reporting. Yes, please open a fresh issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. type: showstopper Issues that are urgent and are critical path. These need immediate attention & shipping.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants