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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Update Doesn't Work #422

Open
rdoll opened this issue Oct 22, 2023 · 11 comments
Open

Force Update Doesn't Work #422

rdoll opened this issue Oct 22, 2023 · 11 comments
Labels
bug Something isn't working as expected

Comments

@rdoll
Copy link
Contributor

rdoll commented Oct 22, 2023

Describe the bug

About -> Force Update doesn't update anything; or at least it doesn't update the version displayed in About. A shift reload on desktop or reload on mobile seems to load the latest version.

Game Enviroment

n/a

To Reproduce

  1. Click on About -> Force Update

Expected behavior

About -> Force Update should always load the most recent version.

Gloomhaven Secretariat Version

0.77.15, 0.78.something and 0.79.3

Used Browser

Chrome 118, FireFox 118, various Android tablet and mobile browsers (specifics unknown)

OS

Windows 10, Android (version unknown)

Additional

Two approaches to handle version mismatches: default to always matching the server or allow client to control.

If always matching server, going to ghs.de should always result in the most recent version loading, i.e. Force Update should be largely useless for online usage (tho still necessary for PWAs, right?).

If allow client to control, it would be nice if there was a dialog about being out of date with the usual "always update automatically", "never remind me again" and "update now" buttons.

@rdoll rdoll added the bug Something isn't working as expected label Oct 22, 2023
@Lurkars
Copy link
Owner

Lurkars commented Oct 24, 2023

I hope it's just because I forgot about the clearing of the cache is asynchronous and will change that. Otherwise, this may overcome my knowledge about PWAs, especially I know that every browser handles this a bit differently.

Lurkars added a commit that referenced this issue Oct 25, 2023
@Lurkars
Copy link
Owner

Lurkars commented Oct 25, 2023

Changed to async/await in v0.79.5. Not sure if this solves the issue, haven't time to test this deep, so happy about more feedback here.

@Lurkars Lurkars assigned rdoll and unassigned Lurkars Oct 25, 2023
@Lurkars Lurkars added the to test Should be fixed, but needs proper testing label Oct 25, 2023
@rdoll
Copy link
Contributor Author

rdoll commented Oct 26, 2023

Awesome. I've updated to v0.79.5 (which definitely had the Force Update didn't work -- I had to shift-reload the browser tab), so I'll verify that Force Update works after the next release.

Closing for now (because only way to add a comment) and will re-open if testing fails.
Thanks, Lurkars!

@Lurkars
Copy link
Owner

Lurkars commented Oct 27, 2023

So very small change, but new Release now v0.79.6. So you should be able to check now, if anything changed here or if the issue still exists.

@rdoll
Copy link
Contributor Author

rdoll commented Oct 27, 2023

Gah. When switching to my GHS tab in latest FireFox, it automatically loaded v0.79.6 :(. I also updated my latest Chrome to v0.79.6, so I'll try both again after the next update.

Thanks.

@rdoll
Copy link
Contributor Author

rdoll commented Nov 4, 2023

Today both FireFox and Chrome automatically updated to v0.80.2. I also checked a manual Force Update and GHS was still working. I think this is sufficient to close this issue, but please re-open if there's more you want to do. And thanks for the fix!

@Lurkars Lurkars closed this as completed Nov 4, 2023
@Lurkars Lurkars removed the to test Should be fixed, but needs proper testing label Nov 4, 2023
@englut
Copy link

englut commented Mar 28, 2024

@Lurkars I updated my ghs-client to 0.94.2, I was on 0.90.7. After hitting force update in my PWA, the version shows 0.90.7.

I had to delete the PWA and re-add it, before seeing 0.94.2.

I'm running ghs in docker, both server and client. Not sure if that helps narrow things down.

@Lurkars
Copy link
Owner

Lurkars commented Mar 29, 2024

@qauff more important would first be OS/Browser. Also I may check docker if some cache policies are in there, that doesn't apply to my hosted version.

@Lurkars Lurkars reopened this Mar 29, 2024
@englut
Copy link

englut commented Mar 29, 2024

Tried on Firefox, Safari on macOS and Safari (PWA) on iOS!

Does the force update mechanism do something specific? Maybe I can do some tests to see exactly what is preventing it from happening.

@Lurkars
Copy link
Owner

Lurkars commented Mar 29, 2024

Yes, force updating is calling this:

async clearAndRefresh() {

which should clear the cache. I just test on Linux with Chrome and on Android with every browser supporting PWAs. For a while I can reproduce this issue in Firefox on Android. But also couldn't really identify what the problem is. Most of the time, I need to hit "Force Update", reload the site manually and then what a while and the normal "Update Button" appears and then it's working. Hitting force update multiple times also helped sometimes. Sadly, I already did research on this but didn't helped for now.

@englut
Copy link

englut commented Apr 1, 2024

Weird. I just updated to 0.95.4 and everything seems to be updated automatically. On my iOS Safari (PWA) and my Firefox on macOS. Must have been some kind of weird cache with the previous setup I had.

Thanks @Lurkars!

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

No branches or pull requests

3 participants