I can’t seem to get the test to pass. I have added the middleware function and it appears to work exactly as the lesson wants, and the connection between freecodecamp and my server works just fine, but it always fails the test. I’m running the test locally, using ngrok to forward. No files have been modified from origin other than myApp.js and package-lock.json (which only has whitespace differences).
The code passes just fine if you use repl.it. The test will not pass when running locally. I don’t really get how OS differences could cause this in particular to happen, because all the logic here doesn’t touch the OS and stays within Node. In case it helps, I’m running Windows 11, 20H2 and Node.js v17.9.0
There are no browser errors other than warnings from frame.ts that Quirks Mode is active. (to fix that, change the writeToFrame function to include at the top of the written document. it’s not absolutely nessecary but worth pointing out)
Sorry, I had to figure out all the local host stuff myself, I didn’t see a guide. I assumed the remote server freecodecamp.org ran on would have been making the requests. It still does not pass with “http://localhost:3000”.
Not sure why it isn’t passing for you. Your code is also passing for me.
Check the network tab in the browser when submitting. Maybe try in a different browser just to test it or in a private Chrome window with no extensions.
If you can pass it using Replit then just get the checkmark using that and move on. The only thing that counts toward the certificates is the final projects.
There is a news guide but it isn’t linked to on the challenge pages.
In a private Google Chrome window (not my primary browser), no extensions; still fails.
root-middleware-logger still returns {“passed”: false}, so obviously nothing changed.
There’s a ‘preflight’ thing that’s failing but I’m not sure that’s really related. (I can’t attach the image, only one is allowed per post, but it says root-middleware-logger | 404 | preflight | Preflight (⇅) | 0 B | 20ms. the (⇅) symbol describes itself with Select the request that triggered this preflight when hovered over.