After a fresh install of a Gatsby project (gatsby new [project name]
) and running gatsby develop
to begin local development, attempting to view the url at localhost:8000
in Chrome results in the webpage constantly refreshing itself. After canceling the page load, and viewing the console, you can see the following errors:
gatsby new [project name]
cd [project name]
gatsby develop
localhost:8000
in a Chrome windowThe default Gatsby starter landing page should be shown.
The webpage is constantly refreshing itself without any input from the user
System:
OS: macOS 10.14.6
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 77.0.3865.90
Firefox: 69.0.1
Safari: 12.1.2
npmPackages:
gatsby: ^2.15.29 => 2.15.29
gatsby-image: ^2.2.24 => 2.2.24
gatsby-plugin-manifest: ^2.2.20 => 2.2.20
gatsby-plugin-offline: ^3.0.11 => 3.0.11
gatsby-plugin-react-helmet: ^3.1.10 => 3.1.10
gatsby-plugin-sharp: ^2.2.28 => 2.2.28
gatsby-source-filesystem: ^2.1.29 => 2.1.29
gatsby-transformer-sharp: ^2.2.20 => 2.2.20
npmGlobalPackages:
gatsby-cli: 2.7.54
Hi, thanks for opening the issue. I can't reproduce the issue with Chrome 77.0.3865.120. Can you please update your project or give more details on how to reproduce this problem?
I'm running into the same issue with all Gatsby projects, on both Chrome and Firefox. Opening the site in an incognito window doesn't have this problem. I wonder if it has to do with the offline plugin and service worker?
@steven-mercatante I found that a workaround for now is to use http://127.0.0.1:8000/
instead of http://localhost:8000
Found this while searching through related issues: https://github.com/gatsbyjs/gatsby/issues?utf8=%E2%9C%93&q=is%3Aissue+127.0.0.1
Hiya!
This issue has gone quiet. Spooky quiet. 馃懟
We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 馃挭馃挏
Hey again!
It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.
Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community!
I'm usually able to resolve with a hard page reload, ctrl + shift + r
It seems to have to do with cache maybe?
I'm also having this issue, hard reload works but still a pain to work with.
I'm usually able to resolve with a hard page reload, ctrl + shift + r
It seems to have to do with cache maybe?
thank you for sharing this. fixed it for me
I'm usually able to resolve with a hard page reload, ctrl + shift + r
It seems to have to do with cache maybe?
Thanks for sharing. I had a similar issue, and this fixed it for me.
I'm also having the same issue. hard page reload is the only thing that fixes it.
can confirm hitting http://127.0.0.1 instead of localhost resolved this issue for me - does anyone know why that might be?
I believe that this is a cache issue with chrome. After reading #5900, @prajapati-parth solution worked for me
But rather than clearing the entire browser's cache, you can just open developer tools and click "clear site data" from Applications tab.
This fixed the issue for me.
Hi , I am facing this same issue. And things are not working for me . Can't even open console, hard refresh is also not working.Not even incognito. Kindly help
Hard refresh solves the issue only until the next 'normal' reload, and then nothing helps. Except for the following:
Go to Dev tools > Application > Service workers, make sure the current service worker is on http://localhost:8000/ and hit 'Unregister' link on its right.
I am having this issue on Firefox, it loads fine on Chrome - anyone found a fix for this?
I'm also experiencing this issue in Firefox - probably because of my privacy settings preventing the service worker from registering
Failed to get service worker registration(s): Storage access is restricted in this context due to user settings or private browsing mode.
Also should note that if I gatsby build
and gatsby serve
I no longer get this error.
I've got exactly the same problem on Firefox. Neither localhost:8000 nor 127.0.0.1:8000 work for me (Windows 10 Firefox 83.0b8 (64-bit).
Gatsby serve then localhost:9000 does work.
I'm getting the same issue, although it does seem to stop....eventually...on its own.
Chrome Version 86.0.4240.193 (Official Build) (x86_64)
Edit: I can reproduce the error consistently if I scroll to the top or the bottom of any given page. It stops if I scroll off the top or bottom.
Same stuff here, every JavaScript error makes the page start an infinite reloading until my pc totally freeze and I have to restart it. I'm working on Linux, ubuntu
Most helpful comment
@steven-mercatante I found that a workaround for now is to use
http://127.0.0.1:8000/
instead ofhttp://localhost:8000
Found this while searching through related issues: https://github.com/gatsbyjs/gatsby/issues?utf8=%E2%9C%93&q=is%3Aissue+127.0.0.1