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

bug(curriculum): Advanced Node Challenges fail when using localhost for url #36739

Closed
RandellDawson opened this issue Aug 31, 2019 · 8 comments
Closed
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory.

Comments

@RandellDawson
Copy link
Member

RandellDawson commented Aug 31, 2019

Not sure if this will actually be a bug once we go to production, but I noticed if I use http://localhost:3001 (my local running version of the first challenge in the Advanced Node Challenges, none of the tests pass and there are several errors in the console. This also happens when I run everything locally.

Using the same url on the current production site for the same challenge does not fail any of the tests.

I have validated the solution is correct.

image

image

This is annoying if you are trying to make changes to a challenge to validate the tests are working as they should (without having to run npm run:test:curriculum) after every code change while working on challenge tests.

@RandellDawson RandellDawson added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. release: next/beta labels Aug 31, 2019
@RandellDawson
Copy link
Member Author

RandellDawson commented Aug 31, 2019

Update: I used a working Glitch project url for both the beta site and locally and get the same results. I did not check any other of the challenges in this sections, but I have a feeling none of them work.

@raisedadead
Copy link
Member

Curriculum is independent of the release label. That's kept for platform mostly.

@RandellDawson
Copy link
Member Author

@raisedadead I added the release: next/beta label because this bug is not present in the current production environment. It has to be something related to the current master.

@RandellDawson
Copy link
Member Author

It is all of the curriculum challenges in this section and not just one challenge. To me, this is a show-stopper and must be fixed before the next release to production.

@raisedadead raisedadead added platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. release: next/beta 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. labels Sep 6, 2019
@raisedadead
Copy link
Member

This is a platform issue, which I brought in with 56d78a1

@raisedadead raisedadead added the status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. label Sep 6, 2019
@Bouncey Bouncey removed platform: api Server application that needs familiarity with Express, Loopback, MongoDB etc. release: next/beta status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. 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. labels Sep 10, 2019
@Bouncey
Copy link
Member

Bouncey commented Sep 10, 2019

Don't be so hard on yourself @raisedadead. It is as @RandellDawson guessed. The CORS in the boilerplate is where the error is coming from.

Currently the boilerplate only excepts requests from *.freecodecamp.org domains, hence the CORS error when on .dev or running the learn platform locally.

In short, not a blocker for the next release.

For developing the challenges locally, update the cors in the boilerplate to accept /https?:\/\/localhost(:\d*)?/

@raisedadead
Copy link
Member

🤦‍♂

Thanks a ton @Bouncey ! You are life saver. 15 months worth of dev has definitely kept me on the edge for a while. Lol. :)

@RandellDawson
Copy link
Member Author

@raisedadead Should we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory.
Projects
None yet
Development

No branches or pull requests

3 participants