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

Race condition when checking for versions #474

Open
Emosewaj opened this issue Sep 6, 2022 · 0 comments
Open

Race condition when checking for versions #474

Emosewaj opened this issue Sep 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Emosewaj
Copy link

Emosewaj commented Sep 6, 2022

When clicking the I Agree button after launching ModAssistant, I would always immediately get the error Could not download versions list. After doing regular troubleshooting with no success I've decided to dig into the code.

I was able to figure out that, at least on my end, the download of the resources at https://versions.beatmods.com/versions.json and at https://alias.beatmods.com/aliases.json both take exactly 42.5~ seconds each, meaning the game version check only happens after about a minute and a half, only after that does the I Agree button function properly, meaning checking for a checked version in the Main Window can potentially happen way before the version check has finished.

devenv_2022-09-07_00-25-36
devenv_2022-09-07_00-26-40

System.Diagnostics.Stopwatch was used to generate these timings. Note that both resources load instantaneously on my regular web browser. Only Mod Assistant is slow in acquiring them.

I would personally suggest that the check that causes the Could not download versions list error be decoupled from the I Agree button as the Mods tab button enables itself automatically once the version check has passed. The error popup may instead be tied to an actual failure during the download and/or check process.
You could display a modal indicating that the version check is still in progress, perhaps like so:
ModAssistant_2022-09-07_00-40-30
If the version check is still in progress after clicking I Agree, you could replace the text on the Intro tab with a hint that version check is still in progress, and to please wait.

@DeadlyKitten DeadlyKitten added the bug Something isn't working label Oct 29, 2024
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

2 participants