-
Notifications
You must be signed in to change notification settings - Fork 58
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
Old code displayed on initial load #1148
Comments
This reproduced 1/2 hour ago but now, after clearing the browser files again, no longer reproduces. I'm closing this issue instead of deleting it in case we need to reference this again. |
I have reopened this ticket as it is currently happening for @JohnamLane and @katiemcgoff (and probably many others). I increased the Coops UI version patch release number (ie, v1.0.1) and build/deployed to dev, but the issue is still happening. |
It looks like the VUE PWA Plugin was missing (I deleted it recently). I pushed a change (bcgov/lear#303) to restore the package and the console errors are now replaced with: Also, the Dev Tools -> Application -> Service Workers show a single SW WITH Status = "Activated and running". |
For configuration, see: See also |
It looks like this is now resolved with no further configuration required. |
TESTING NOTESYou can verify that:
|
There is currently a new build available, so I logged in to Dev and looked at the console. It indicated that "New content is available. Please refresh." In my mind, this is only partly acceptable, because users will not check the Dev Console and see that they should hard-refresh the page. I will open a new ticket for this. |
The subject issue is discussed here: https://redfin.engineering/service-workers-break-the-browsers-refresh-button-by-default-here-s-why-56f9417694 |
Describe the bug
As a user, when I login to Coops Dev, the web app that is initially loaded is old code. If I refresh/reload the page then the latest code is loaded... But if I logout and login again then I see the old code again.
This could be serious if we deploy a fix or new feature to production but the users intermittently see the old code instead.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The header should have a 70px margin between it and the entity info block (ie, latest code).
Actual behavior
The header does not have a 70px margin, indicating that the previous code is being executed. This can be proven by refreshing the page (to get the latest code) and seeing the expected behavior... but this reproduces on the next login.
This reproduces in Chrome, Firefox, IE11, etc. In all browsers, the browsing data and files were deleted but the behaviour persists.
@thor found this:
https://forum.vuejs.org/t/vue-cli-3-project-with-pwa-not-busting-cache-on-new-builds/50252/7
https://redfin.engineering/how-to-fix-the-refresh-button-when-using-service-workers-a8e27af6df68
@severinbeauvais found the following to be useful:
https://bitsofco.de/the-service-worker-lifecycle/
https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle
https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
The text was updated successfully, but these errors were encountered: