-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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-plugin-offline resulted in blank pages for some users #13410
Comments
Insert this into your gatsby-browser.js file export const onServiceWorkerUpdateReady = () => window.location.reload(true) It will reload the window when ever a new update is available, you could use desktop push notification as well like so: https://stackoverflow.com/a/52864378/7396786 |
Could this be the same issue as #11524 and #12399 (comment)? |
@smakosh I've had that in for a good while, but unfortunately users still see a blank screen with |
meaning your issue is unrelated to the offline plugin, as @luukdv mentioned, it's related to that same issue |
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’s 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/contributefor more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m 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! |
Anyone had any luck on this ? having a similiar issue. |
Experiencing this issue here as well, when saving to home screen both on ios safari and android chrome and trying to browse to previously unvisited pages. using gatsby-plugin-offline 3.0.25 with gatsby version 2.17.0, tried #13410 with no success, any thoughts? |
There is known issue with gatsby-plugin-offline that can cause mobile pages not to load. gatsbyjs/gatsby#13410
There is known issue with gatsby-plugin-offline that can cause mobile pages not to load. gatsbyjs/gatsby#13410 Co-authored-by: Kris Evans <kevans@cloudflare.com>
I had those white page problems for a while and quite frequently received user feedback about it. So at some point, I decided to disable the plugin with I just started to tackle this problem again after an upgrade to I aggressively tried to break things on several browsers on my local machine and BrowserStack, but everything worked like a charm, while it was super easy to break things before. Of course, this is by no means comprehensive and things could still go wrong out in the field and those kinds of bugs are a nightmare since they are very hard to test and reproduce. I am very interested in your recent experiences with this situation with newer versions of |
Any update on the issue. I am facing the same issue on gatsby site I built for the client on both UAT and production site. |
It's already included in the file. But I still have the issue of a blank screen which will go away with hard refresh or cleaning cache. Not a user-friendly marketing site at all which I have pushed to production. |
@iheathers I had similar experience when upgrading versions in Gatsby. Everything was fine, suddenly users having older versions of the page cached run into blank screens. In latest v2, at least for my MDX driven projects, gatsby-plugin-offline yielded a lot weird hydration errors. These became better when removing the plugin, but still happen some edge-cases. My guess is, that in my case, the error is somewhere else and gatsby-plugin-offline accelerates the bug. In the end, I removed gatsby-plugin-offline in all projects, currently still embedding https://www.npmjs.com/package/gatsby-plugin-remove-serviceworker to ensure nobody ends up with a blank or broken page. Fortunately, Gatsby is fast enough, even without the offline plugin. Especially when proper cache headers are set, which Netlify does for me. In the end the |
Description
A fresh deployment of
"gatsby-plugin-offline": "^2.0.24",
resulted in blank pages for some of our users. The website was unusable, resulting in a bounce-rate of ~50%. Upgrading to latest version ofgatsby-plugin-offline
did not help, still same result.I attached a page dump (
Save page as
in Chrome) I received from a machine where the error occurred.It seems that gatsby-plugin-offline wanted to load old paths which are not existing anymore, resulting in the update functionallity to break?
page-dump-blank-page-with-gatsby-plugin-offline.zip
Fixes that worked:
gatsby-plugin-remove-serviceworker
. The page now works as expected on all machines, but now lacking the offline functionality :(Steps to reproduce
Was not able to reproduce it on my own machine, with a clear browser cache it did not happen.
Expected result
Website to display as expected.
Actual result
Blank page, a lot of 404s in the browser console. See zip above.
Environment
Run
gatsby info --clipboard
in your project directory and paste the output here.The text was updated successfully, but these errors were encountered: