-
Notifications
You must be signed in to change notification settings - Fork 278
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
yopass upgrade and browser cache #787
Comments
Hi @PiotrIr Sorry to hear you're having issues. Yopass uses the create-react-app template which used to include a serviceWorker which where registered with the earlier versions of yopass. My guess is that there's a service worker still active in the browser for your domain. My hope is that it will unregister after some time when it notices that it's no longer present in the website. You could try opening the console in a "broken" browser when on your installation of yopass and run
To see if there's a service worker registered |
Hi jhaals, Thank you for your reply. Looks you are right about worker: workers Array [ ServiceWorkerRegistration ] Do you know how long it may take for browser to unregister it? It is four days since I upgraded the yopass and still can see Firefox opens old version... |
I don't know how long it takes for it to expire unfortunately. One workaround could possibly be to add some custom registration logic into to index page. navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister()
} }) |
Hi jhaals, Will you be able to advise how to do this? I've tried to log in to container bash and getting message: I'm not good in docker, so any help will be appreciated. |
The website is compiled so you cannot change it inside the Docker container, secondly it's running distroless so there's no bash or sh available :) The easiest thing you can do is to clone the repository, goto website/public/index.html <script>
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister()
} })
</script> |
For what it's worth, I've had pulled my hair out about this behavior as well back at SoundCloud. The caching results in the page appearing to load just fine, even when it was actually not accessible (because SoundCloud's yopass installation was originally deployed behind a SSO reverse proxy). It also sometimes resulted in a very broken page, when the base html was still cached, but the translations couldn't be fetched. I basically have no knowledge about browser service workers, but removing/improving the cache behavior would be rad. |
Thanks for letting me know. |
So I've just released version 11.1.0 that includes an automatic unregister. I hope that it will make things easier for your @PiotrIr |
Hi Johan, Many thanks for this. |
Hi, does it work if you do a shift+f5 refresh or shift+cmd+r on mac? I had
a service worker installed in my firefox but it got removed using the
latest code and refreshing the page fully.
…On Mon, Mar 8, 2021 at 10:38 AM PiotrIr ***@***.***> wrote:
Hi Johan,
Many thanks for this.
Unfortunately in some reason, after I've upgraded the docker container,
this still doesn't work and old website displays. Could you help please?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#787 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQ25DDVE3NYBMY6ZPXBETTCSLLBANCNFSM4YCXZTTQ>
.
|
Hi Johan, Yes, when I pressed ctrl+f5 it has indeed removed all version. Sorry, I've expected it will remove the worker service when I just open the website. Thank you for your help. |
Hi, I just wonder if you could help me please?
I've just upgraded yopass to the latest version and the server is working fine. However I can see my browser (and any other user's to which I've sent password) keeps an old version of the website. If I open it in incognito mode - everything is working fine. I'm sure if I will clean cache on my browser - it will start working, but I can't do it on all browsers to which I used to send passwords. Could you advise how to resolve the issue please?
The text was updated successfully, but these errors were encountered: