epicweb-dev / full-stack-foundations

Learn the foundational skills of building full stack web applications.
https://epicweb.dev/workshops/full-stack-foundations
Other
592 stars 152 forks source link

App keeps reloading and won't stop #99

Open jimmymarks opened 2 weeks ago

jimmymarks commented 2 weeks ago

I followed the instructions for setup and got all the way to npm start in the terminal. I got the 🐨 Let's get learning! and the prompts with the URLs for the app, but when I open it in the browser, the app loads, and reloads, and never finishes loading...not sure why. My attempts to try and figure out what was hanging it or why it felt the need to keep building and rebuilding didn't give me much.

kentcdodds commented 2 weeks ago

I think I know what bug this could be. Does your browser block cookies?

jimmymarks commented 1 week ago

Hi, @kentcdodds –

No, I'm only blocking cookies in Incognito Mode.

jimmymarks commented 1 week ago

Hi, @kentcdodds –

I took a screengrab of the offending code here. Seems like it can't establish initialPathname? This is true for me in every single browser I use, incognito or not.

2024-09-18_14-22-48

kentcdodds commented 1 week ago

Ah that's a real bummer... I'm not so sure what that could possibly be caused by. Looks like some pretty edge-case code you're ending up in. Definitely not what I thought was causing this... Hmmm...

Could you tell me what the error message says?

jimmymarks commented 6 days ago

Console error:

Initial URL (undefined) does not match URL at time of hydration (/), reloading page...
jimmymarks commented 6 days ago

One more, at the first moment after reload begins:

Uncaught (in promise) SecurityError: Failed to construct 'PresentationRequest': The document is sandboxed and lacks the 'allow-presentation' flag.
kentcdodds commented 5 days ago

That last error is fine.

This error though:

Initial URL (undefined) does not match URL at time of hydration (/), reloading page...

That is concerning and seems to be an issue in React Router / Remix. Do you think you could come to my next Office Hours so we can debug the issue together? It's possible the output of that meeting would be an issue filed on React Router.

kentcdodds commented 5 days ago

The tricky thing is I can't reproduce your issue so I need to be able to debug with you on your machine.