OpenRCT2.org icon indicating copy to clipboard operation
OpenRCT2.org copied to clipboard

API doesn't give a download link while builds are availble

Open Broxzier opened this issue 6 years ago • 4 comments
trafficstars

The update script that I use on my Ubuntu server fetches the last download link from this API call: https://openrct2.org/altapi/?command=get-latest-download&flavourId=9&gitBranch=develop

Normally, it gives back an URL to the last develop download link, but now I get this response:

{
  "error": 1,
  "errorMessage": "No download available."
}

I suspect the reason for not giving back an URL is because a "newer" build is available for another platform, right now that's x86 ZIP and installer: https://openrct2.org/downloads/develop/v0.2.3-d730a76

"newer" is quoted, because the build was probably pushed later, but the build comes from a commit that is from before the the Linux build has finished: https://openrct2.org/downloads/develop/v0.2.3-68dc4d0, meaning that the Linux build is ahead, but doesn't show up under the "latest" build.

I suspect this is also what's causing the Launcher to fail to download updates.

Broxzier avatar Aug 10 '19 15:08 Broxzier

Your assumptions are correct. I'll fix it soon.

GingerAdonis avatar Aug 12 '19 14:08 GingerAdonis

Note to self: Bug still exists. Should really look into it.

GingerAdonis avatar Feb 13 '22 01:02 GingerAdonis

@GingerAdonis bug still happens. I'd suppose an extra where-clause here to get the latest build with a required flavour present could potentially fix it?

Basssiiie avatar Mar 28 '22 17:03 Basssiiie

That's for the website, but I guess the API works in a similar way. Wouldn't this be fixed by simply giving back the last successful build for the given flavourId and gitBranch?

Broxzier avatar Apr 01 '22 09:04 Broxzier