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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with cache busting on new release #121

Closed
colthreepv opened this issue Jan 26, 2021 · 19 comments
Closed

Problems with cache busting on new release #121

colthreepv opened this issue Jan 26, 2021 · 19 comments
Labels
Bug Something isn't working

Comments

@colthreepv
Copy link

When updating to a newer release of VueTorrent (BTW I really dig the new black style 馃コ GJ!)
I always have the issue described here: vuejs-templates/pwa#177

There is a valid workaround explained here https://github.com/stetrevor/vuejs-pwa-demo

I will be more thorough: ServiceWorkers only work over HTTPS (recent change), so the PWA part of vue-cli only affects the small amount of users that publish their qbittorrent webUI protected by SSL, this includes me.

What happens then, the basic implementation of the @vue/cli-plugin-pwa does indeed cache the app, but TOO MUCH, the website never gets updated, when I update with a new release, except if used shift+ctrl+r

@WDaan
Copy link
Collaborator

WDaan commented Apr 3, 2021

Possibly solved by #183? Feel free to re-open if not

@WDaan WDaan closed this as completed Apr 3, 2021
@jef
Copy link
Contributor

jef commented Apr 13, 2021

Hey @WDaan, still can't seem to bust this cache. I get the new version in the Settings modal, but categories aren't getting updated. Is this something else I should do? They appear in incognito.

@WDaan WDaan reopened this Apr 13, 2021
@jef
Copy link
Contributor

jef commented Apr 13, 2021

Let me know if I can give any more information or try anything for you.

@m4ximuel
Copy link
Contributor

m4ximuel commented Apr 15, 2021

@jef This problem occurred because the two image files pwa requested were missing. Perhaps this has been resolved in version 0.9.0.
Please let me know if the problem is reproduced.

@jef
Copy link
Contributor

jef commented Apr 20, 2021

Refreshing did great and I got some of the new modals and some images! But for the categories, I still don't see Uploaded. Although running in incognito this is part of the list.

@m4ximuel
Copy link
Contributor

@jef please test this: #227
It is a patch that clearly complies with the service worker rules. It may require 2-3 refreshes after release.

@jef
Copy link
Contributor

jef commented Apr 20, 2021

I'll checkout a build. Thanks!

@jef
Copy link
Contributor

jef commented Apr 20, 2021

Built and using, but no avail. After a few refreshes, I got the change I made with the version linking, but no updating on the filtering.

Normal:

image

Incognito:

image

Also scrolled to bottom, no Uploaded.


I also tried updating on reload as well as unregistering the service worker to no avail.

@m4ximuel
Copy link
Contributor

m4ximuel commented Apr 20, 2021

@jef Um...Have you ever been item 'uploaded' missing from a previous version before I got involved?

Incidentally, the new service worker policy requires that all 'VueTorrent' processors be shut down for updates. need restart, not refresh

@jef
Copy link
Contributor

jef commented Apr 20, 2021

Incidentally, the new service worker policy requires that all 'VueTorrent' processors be shut down for updates. need restart, not refresh

As in restart browser?

@WDaan
Copy link
Collaborator

WDaan commented Apr 20, 2021

Perhaps it has nothing to do with the service worker? All your settings are saved using vuex-persist into localstorage. When you launch VueTorrent, previous settings/state are loaded from localstorage. When new properties are added to the default settings, e.g. an uploaded property, they get overwritten by the old state that's retrieved from localstorage upon opening VueTorrent.

Deleting these settings from localstorage & then quickly refreshing before they get saved again will probably solve your problem.

I've allready mentioned this problem somewhere else, a refactor to use websql would be nice. I created a 'card' for this on the project board aaaages ago. Sadly I haven't gotten around to it yet, same goes for a lot of other issues and ideas for this project 馃槄 馃槩

@m4ximuel
Copy link
Contributor

m4ximuel commented Apr 20, 2021

@jef no need restart browser but no tabs should have VueTorrent open. I guess the problem @WDaan mentions is correct

@jef
Copy link
Contributor

jef commented Apr 20, 2021

Deleting these settings from localstorage & then quickly refreshing before they get saved again will probably solve your problem.

For whatever reason, I thought I'd done this in the past. I went into Chrome (chrome://settings/siteData) and deleted the local storage from there. Deleting the local storage from the developer console and Application tab didn't work (like you mentioned, it auto populates too quickly).

I'll close for now. Thanks for both of your help and sorry for my ignorance 鈽猴笍

@WDaan
Copy link
Collaborator

WDaan commented Apr 20, 2021

I usually do in the the 'Application' Tab in Chrome Dev tools, but you have to be fast.
Did that actually solve your issue though? 馃檪

No worries at all! You're right to open an issue, the application isn't behaving in a way that is to be expected... so it should indeed be fixed. I threw vuex-persist in there and called it a day aaaages ago, but the application should handle persisting data a lot smarter/more efficient. I would like to adres this soon'ish.

@jef
Copy link
Contributor

jef commented Apr 20, 2021

Did that actually solve your issue though? 馃檪

Yep! All set it seems.

I threw vuex-persist in there and called it a day aaaages ago

All too familiar with this 馃槅

@sulliops
Copy link

This issue is rather noteworthy after upgrading to release 0.13.0 (which I did today because of this fix for disabling authentication for setups behind reverse proxies). Reloading the page sends me right back to the login page, which should be disabled, because a service worker is caching the app status.

Full console message:

App is being served from cache by a service worker.
For more details, visit https://goo.gl/AFskqB
Service worker has been registered.

@WDaan
Copy link
Collaborator

WDaan commented Nov 15, 2022

Lets see if this issue changes with 1.0.0 Vite release

@WDaan
Copy link
Collaborator

WDaan commented Nov 16, 2022

Been rolling with this for a couple of days, new updates seem to come true just fine.

Let's reopen or create a new issue if this happens in the future.

@WDaan WDaan closed this as completed Nov 16, 2022
@jef
Copy link
Contributor

jef commented Dec 5, 2022

Nice job @WDaan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants