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

Gatsby website not showing up in Chrome #1189

Closed
budparr opened this issue Jun 16, 2017 · 11 comments
Closed

Gatsby website not showing up in Chrome #1189

budparr opened this issue Jun 16, 2017 · 11 comments

Comments

@budparr
Copy link

budparr commented Jun 16, 2017

Nice new design. Hope this is the right repo for the blog, aplogies if not.
The site shows up fine in Safari, but not Chrome, where I get empty pages and slow loading. http://www.whatsmybrowser.org/b/QNBX5NS

Here's the contents of my console log for this page: https://www.gatsbyjs.org/blog/gatsby-first-beta-release/

layout-component---index-6816a5d6f3f6888f57e0.js Failed to load resource: the server responded with a status of 404 ()
layout-component---index-6816a5d6f3f6888f57e0.js Failed to load resource: the server responded with a status of 404 ()
app-92809bf350416bae9390.js:3117 Uncaught TypeError: executeChunk is not a function
    at app-92809bf350416bae9390.js:3117
    at app-92809bf350416bae9390.js:4190
    at handler (app-92809bf350416bae9390.js:3429)
    at app-92809bf350416bae9390.js:3473
www.gatsbyjs.org/:1 The resource https://www.gatsbyjs.org/static/tex-gyre-schola-400.030fe0c4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.

screen shot 2017-06-16 at 3 42 20 pm

@budparr
Copy link
Author

budparr commented Jun 16, 2017

opening it up in incognito, it works okay. Must be a conflict with one of my plugins. I whitelisted the site on disconnect. I'll see what I can find, and hopefully it's just local to me.

@KyleAMathews
Copy link
Contributor

Ugh, really got to fix this issue.

So the problem is that Gatsby is loading from a service worker which is great but sometimes your browser loads an old version of the site and when it does it'll then try to fetch stuff off the server which don't exist anymore so a 404 error happens. Unfortunately Gatsby's page resource fetching code is naive so it doesn't handle this.

What I need to do is catch errors like this and then force a refresh with a new service worker so you're updated to the latest version of the site.

@KyleAMathews
Copy link
Contributor

Thanks for the report and bearing with our rocky roll out :-)

@budparr
Copy link
Author

budparr commented Jun 16, 2017

Ah, okay, hence it working in incognito. I was going to feature the site in my newsletter, but I can wait. Looks great though and am excited for you getting so close to 1.0!

@KyleAMathews
Copy link
Contributor

Ok! This is only a problem for repeat visitors so new people are fine :-) also it's pretty easy fix which I'll get to tomorrow.

@m4rrc0
Copy link
Contributor

m4rrc0 commented Jun 17, 2017

Woops. Just posted this issue #1193 refering to the same (kind of) problem.

@KyleAMathews
Copy link
Contributor

Did some work on this #1217

If a user w/ sw navigates to a page it doesn't know it immediately reloads. Also when a new service worker is installed the page is reloaded. Makes for a bit of a "hiccup" but it's not too bad (loading from the sw is fast). We'll roll with this for a while and see how we like it.

@eladams
Copy link

eladams commented May 1, 2018

Hi @KyleAMathews! Although this issue is quite old, I'm revisiting it regarding SW. What is the best way to update websites so returning users load performance will not be degraded?

Note:
Currently, we publish our website from S3 through CloudFront (+ Lambda Edge).
Every new version we effectively delete the previous one ( which sort of wrong :) ) , and this might be the reason for slow first time loading of the website for revisiting users.

@CSumm
Copy link

CSumm commented Aug 3, 2018

I am actually running into this problem as well, it was working a few hours ago and when I serve it to localhost now I'm getting a blank page.

@DWboutin
Copy link

DWboutin commented Oct 27, 2018

I got this error when Refreshing this page: https://mikaelboutin.com/en/page-2/

There's the repo of my project like it is now online https://github.com/DWboutin/gatsby-setup

Can you check it quick @KyleAMathews or any of you? Thank you

@GitHubGreg
Copy link

I’m also having this issue on iOS Safari. The site loads in a private tab. Not in a regular tab. Is there a way to resolve this? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants