JamieBort / Portfolio-Website

This is where I share a bit about myself, showcase what I've been working on, and share where you can find me online. It is build with a React + Vite front end and a Node Express backend. And styled with MUI.
https://jamiebort.com
GNU General Public License v3.0
0 stars 0 forks source link

Address white page after the website loads #25

Closed JamieBort closed 3 months ago

JamieBort commented 4 months ago

Describe the bug A clear and concise description of what the bug is.

When the page is loaded the page is going blank after 15 seconds or so.

Specifically, the page loads as expected and then the content disappears after a brief time. The page is left blank.

This is independent of the device - it is happening on mobile devices as well as laptops

To Reproduce Steps to reproduce the behavior:

  1. Navigate to a. jamiebort.com or b. www.jamiebort.com or c. http://www.jamiebort.com/

    (Possibly all three URLs.)

Expected behavior A clear and concise description of what you expected to happen.

When the page loads, the content that is loaded should remain.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

See Feedback from Kyle via Slack yesterday: in the comment below: https://github.com/JamieBort/Portfolio-Website/issues/25#issuecomment-2104793534

This may be related to https://github.com/JamieBort/Portfolio-Website/issues/31 and/or https://github.com/JamieBort/Portfolio-Website/issues/30

JamieBort commented 4 months ago

Feedback from Kyle via Slack yesterday:

the live site was note responsive in my browser either and went blank after a while as you described. i’m sure i’ve seen that “.map is not a function” error before. i’m going to start there because it’s the more critical issue. i’ll let you know if i have any trouble getting the vite stuff it running.

and

so i started in Projects.jsx because that’s where the error “repos.map is not a function” was coming from. i think it’s something to do with your setTimeout and Render.com which i’m not familiar with… but it’s actually exactly 1 minute before the site goes blank, which is the same amount of time as your setTimeout.

and

yeah when i change the setTimeout to 10_000 it goes out after 10 seconds.

and

i took the setTimeout out and it’s disappearing a fraction of a second after it loads. so obviously that setTimeout is delaying whatever the problem is. it’s interesting that the code it’s complaining about is for when loading is false. it’s been a while since i did any frontend react stuff, i’m just going to try to orient myself more with the steps of how this page is loading and what the useEffects are doing, but that’s what i’ve got so far.

and

i wonder if it has something to do with the order things are loading in? i noticed console.log("reject:", reject); runs when the error happens. i’ve also noticed that it behaves differently if you let it rerender by saving code vs. manually reloading it with the button on the browser. with the setTimeout removed if i let it render by saving the code the page doesn’t disappear, but if hit the reload button in chrome it disappears right away.

JamieBort commented 3 months ago

Fixed Issue on this 25-address-white-page-after-the-website-loads branch.

Then merged that branch into dev. See this e0cef66d344d2153d4a153f3a6a8c6b87c4e85b9 commit.

JamieBort commented 3 months ago

Merged dev into master with this e0cef66d344d2153d4a153f3a6a8c6b87c4e85b9 commit.

It automatically deployed. So far everything looks okay.

JamieBort commented 3 months ago

Addressed. No longer an issue.