full-stack-foundations icon indicating copy to clipboard operation
full-stack-foundations copied to clipboard

App keeps reloading and won't stop

Open jimmymarks opened this issue 1 year ago • 8 comments

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.

  • Browser: Version 128.0.6613.120 (Official Build) (arm64) [Note: This was true in every browser, but this is the one I use most]
  • OS: MacOS Sonoma Version 14.6.1 (23G93)
  • git --version git version 2.39.3 (Apple Git-146)
  • node --version v20.16.0
  • npm --version 10.8.1

jimmymarks avatar Sep 11 '24 19:09 jimmymarks

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

kentcdodds avatar Sep 13 '24 21:09 kentcdodds

Hi, @kentcdodds –

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

jimmymarks avatar Sep 18 '24 17:09 jimmymarks

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

jimmymarks avatar Sep 18 '24 18:09 jimmymarks

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?

kentcdodds avatar Sep 18 '24 22:09 kentcdodds

Console error:

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

jimmymarks avatar Sep 23 '24 17:09 jimmymarks

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.

jimmymarks avatar Sep 23 '24 17:09 jimmymarks

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 avatar Sep 24 '24 03:09 kentcdodds

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

kentcdodds avatar Sep 24 '24 03:09 kentcdodds

As I cannot reproduce this myself I'm going to close this issue.

kentcdodds avatar Nov 05 '24 17:11 kentcdodds