Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Bug: When pressing the opensauced logo to go to the homepage I get sent to an old version #1436

Closed
2 tasks done
wotta opened this issue May 10, 2022 · 9 comments
Closed
2 tasks done

Comments

@wotta
Copy link

wotta commented May 10, 2022

Describe the bug

  1. Go to: https://docs.opensauced.pizza/
  2. Click on the logo
  3. You get redirected to: https://opensauced.pizza/
  4. This the homepage version: Open Sauced v0.42.5

Screenshot 2022-05-10 at 14 45 51

This should be the latest version of the homepage as shown below.

Screenshot 2022-05-10 at 14 45 34
e

Steps to reproduce

  1. Go to: https://docs.opensauced.pizza/
  2. Click on the logo
  3. You get redirected to: https://opensauced.pizza/
  4. This the homepage version: Open Sauced v0.42.5

Affected services

opensauced.pizza, docs.opensauced.pizza

Platforms

Desktop

Browsers

Other (add additional context)

Environment

Production

Additional context

Brave browser V1.38.111

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@0-vortex
Copy link
Contributor

Hey, thanks for adding this issue, back in v0.42.5 the service worker wasn't correctly checking for new versions, hence why some assets on that redirect are not loading. Refreshing the page once without cache or deleting local *.opensauced.pizza should fix the error locally. Unfortunately, we cannot retroactively solve v0.42.5 but the problem is solved, currently. Do you think a page in the docs obout this issue and how to clear the session would make sense?

cc @bdougie had this issue on stream once as well, what do you think?

@wotta
Copy link
Author

wotta commented May 11, 2022

Thanks for the quick reply @0-vortex.
I'm not fully sure if the page in the docs is a needed. I have the feeling that I'm one of the handful of people who will encounter this issue.

But since this repository is based on getting people introduced with opensource contributions, I am not gonna shoot down an opportunity for someone in the very basics of opensource contributions.

@bdougie
Copy link
Member

bdougie commented May 11, 2022

Yeah, we need to clear the cache aggressively for users. The site was getting 2300 uniques a month before the change, so I imagine a not insignificant amount of people will encounter this.

@bdougie
Copy link
Member

bdougie commented May 11, 2022

The solution for anyone who encounters this is to unregister the service worker. We can work on a fix to automate this, but for now, I think this is a viable solution for the 165 (out of 2300 uniques referenced above) active users.

image

Be sure to refresh after you click ungregister.

@bdougie bdougie pinned this issue May 11, 2022
@bdougie
Copy link
Member

bdougie commented May 17, 2022

I have added the following code to a Netlify snippet injection. It's deployed, just need someone to confirm it works now.

navigator.serviceWorker.getRegistrations().then(function(registrations) {
 for(let registration of registrations) {
  registration.unregister()
} })

@0-vortex
Copy link
Contributor

I have added the following code to a Netlify snippet injection. It's deployed, just need someone to confirm it works now.

navigator.serviceWorker.getRegistrations().then(function(registrations) {
 for(let registration of registrations) {
  registration.unregister()
} })

This makes the service worker stop working for everyone - with no registered resources you would never have the app available offline, the issue is visible by the lack of SW is ready to handle offline requests. message in the console :D

@bdougie
Copy link
Member

bdougie commented May 17, 2022

My reason for putting it in netlify was to fix it now and remove it a month or so. I would rather have the sw not work than get pings that the site is not working entirely a user.

Path of least resistance?

@wotta
Copy link
Author

wotta commented May 18, 2022

Unfortunately I am not able to test this behaviour because I already removed my service worker.
Is there a way to visit an old version of the deployment to activate the old SW?

@0-vortex
Copy link
Contributor

Closing this as won't fix - we might merge app and hot and when that happens, this could be corrected, however might not happen this year! 🍕

@0-vortex 0-vortex unpinned this issue Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants