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

[Util Change]: Initial highest version should not be hardcoded on Server Jars frontend #217

Closed
stephendotgg opened this issue Jul 10, 2024 · 3 comments
Labels
Bug Something isn't working

Comments

@stephendotgg
Copy link
Member

stephendotgg commented Jul 10, 2024

Util Name

server-jars

Changes

https://mcutils.com/server-jars

Reproduce

  • Open Server Jars
  • See 'Paper' and '1.21' preloaded into select
  • Hit 'Download'
  • Get served Paper 1.20.4

Literally only affects the very first download, which in this case we make as Paper + highest avaliable version. Problem is we seem to have a sticky hardcoded variable (1.20.4) which serves the 1.20.4 jar instead of the displayed 1.21 jar.

This fixes itself when you switch platform or version. It is only isolated to first load of the page. Meaning a user cannot download Paper 1.21 without switching platform or version.

We need to make it so the initial variable which is used to serve a jar is Paper + highest avaliable version, not Paper + 1.20.4. This should be a quick change as clearly the select is able to display the correct version.

Extra Info

No response

@stephendotgg stephendotgg added the Bug Something isn't working label Jul 10, 2024
@stephendotgg
Copy link
Member Author

Worse than I thought.

Reproduce

  • Start on Purpur, 1.21
  • Move to Pufferfish
  • Still downloads Purpur (?)

Needs gutted out and fixed. Going to ditch those one line functions because they are not maintable.

@Tofpu
Copy link
Contributor

Tofpu commented Jul 10, 2024

I may be mistaken, but from what it seems, it looks like a race condition is happening here. This is reproducible with every platform if you click quick enough. The async functions doesn't look good

@stephendotgg
Copy link
Member Author

Fixed. Just rewrote the JS, quicker than pulling out all those bugs.

Also made it so we build the download links locally now. Much faster.

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