-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
PaperMC downloads are broken #40
Comments
I'll circle back and propose a fix soon if no one else gets to it. For now I'm going to manually download the release I want so I can get my servers up and running. |
Of note, the docs recommend using Example of pulling build number for a server version:
Unfortunately, this would need some error handling around choosing versions for which there are no stable builds yet/builds in the default channel:
For those builds, you'd need to change the channel to
You could steal code from their docs to check for it being This seems to work for the actual download:
|
For anyone else blocked by this, you can manually run a command like this (inside your container) to download the Paper server version you want, as well as the 3 plugins below, then restart your container. Paper ServerVersion 1.21.3 Example
Also, since the failed Paper download causes the script to skip the Geyser, Floodgate, and ViaVersion downloads, you'll want to also manually run these to get the latest of those (directly from the script). Floodgate Plugin
Geyser Plugin
ViaVersion PluginFor ViaVersion, you'll need to determine the version to download, which the script does for you. Here's that command ViaVersion Version Check
ViaVersion Plugin DownloadUse that version you get from the previous command to replace the variable at the end of the command below and download the latest ViaVersion (I have put the latest build as of this post in there).
Again, after downloading all of these into your container, you'll need to restart it to load the new server/plugins. |
I too was bamboozled by the API change .. for me all I had to do was change the URL in my php script that outputs the latest paper release <?php
$version = $argv['1'];
// OLD API URL
//$url = "https://papermc.io/api/v2/projects/paper/versions/".$version."/builds";
$url = "https://api.papermc.io/v2/projects/paper/versions/".$version."/builds";
$counter = 0;
$decode = (json_decode(file_get_contents($url),True)['builds']);
foreach ($decode as $key => $val){
$counter++;
};
$counter--;
$latestName = (json_decode(file_get_contents($url),True)['builds'][$counter]['downloads']['application']['name']);
$latestBuild = (json_decode(file_get_contents($url),True)['builds'][$counter]['build']);
$download = $url."/".$latestBuild."/downloads/".$latestName;
echo ($download);
?> Edit: |
Could this be why my server crashes about every 5 minutes or so? Never really had this problem before. It just started relatively recently. |
I wouldn’t think so. This bug only should affect downloading new Paper jar files during startup. If your server is crashing after startup, that is something else. You should check the container logs for insight. |
Using a counter is an interesting choice. Their API returns all build numbers for a given server version, so you can just parse the JSON directly to get the newest build, which is what this PR does. Technically just updating the endpoint would work, but I wanted to also improve the logic used in the script to determine the latest build, which also is the suggested way to do it in Paper’s API docs. |
The current endpoint used by the startup script has been deprecated:
Their API docs have instructions on using their currently supported downloads API: https://docs.papermc.io/misc/downloads-api
This bug results in the PaperMC server version failing to download during script startup.
The text was updated successfully, but these errors were encountered: