fix(server): migrate PaperDownloader to PaperMC v3 (fill) API - #428
Merged
okafke merged 1 commit intoJul 13, 2026
Merged
Conversation
PaperMC sunset the v2 API (api.papermc.io/v2); it now returns HTTP 410,
so `server add paper <version>` fails and the server integration test
(runServerIntegrationTest) and server-test jobs break on every branch:
java.io.IOException: Failed to get
https://api.papermc.io/v2/projects/paper/versions/1.21/, response 410:
{"ok":false,"error":"sunset", ...}
Switch to the current v3 "fill" API (fill.papermc.io/v3). Two shape changes
versus v2: the builds endpoint returns a top-level array ordered newest-first
(v2 was an object with a builds array, oldest-first), and each build carries a
ready-made download url under downloads."server:default".url, so the jar URL no
longer needs to be templated. Verified against the live API: the latest-build
path and an explicit-build lookup both resolve to a valid server jar.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
|
Thanks, will base on this and fix it in a sec. With the animosity many people have towards AI, I would prefer to not have Claude as a contributor in the headlesshq repositories. Continued in #429 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PaperMC sunset the v2 API (
api.papermc.io/v2); it now returns HTTP 410.PaperDownloaderstill calls it, soserver add paper <version>fails, breakingrunServerIntegrationTest(in thebuildjob) and theserver-testjobs on every branch and PR:(Purpur, on a different API, still downloads fine in the same test — it's specifically Paper's v2 endpoint that's dead.)
Fix
Switch to PaperMC's current v3 "fill" API (
fill.papermc.io/v3). Two shape changes vs v2:GET /v3/projects/paper/versions/{version}/buildsreturns a top-level array ordered newest-first (v2 returned{ "builds": [...] }oldest-first). So the latest build isbuilds[0], not the last element.downloads."server:default".url, so the jar URL no longer needs to be templated.Verification
:headlessmc-launcher:compileJavapasses.builds[0]) and an explicit-build lookup both yield a validserver:defaultURL that serves a realapplication/java-archive(HTTP 200). v2 confirmed returning 410.runServerIntegrationTest(server add paper), which this unblocks.Context
Surfaced while getting Minecraft 26.2 support green (headlesshq/mc-runtime-test#137, #426). This server-side failure is independent of the 26.2 lwjgl work but was reddening the
buildcheck on those PRs.🤖 Generated with Claude Code