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

PaperMC installation not possible #7349

Open
onkeld opened this issue Jan 6, 2025 · 5 comments · Fixed by #7352
Open

PaperMC installation not possible #7349

onkeld opened this issue Jan 6, 2025 · 5 comments · Fixed by #7352
Labels
Solution available 🥂 Definite solution has been done Upstream change
Milestone

Comments

@onkeld
Copy link

onkeld commented Jan 6, 2025

Creating a bug report/issue

  • [x ] I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version

G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=9
G_DIETPI_VERSION_RC=0
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='applied'
G_LIVE_PATCH_STATUS[2]='not applicable'

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN

bullseye 0

  • Kernel version | uname -a
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

RPi 4 Model B (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)

irrelevant

  • SD card used | (EG: SanDisk ultra)

irrelevant

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)

PaperMC Minecraft Server

Update via dietpi-software reinstall fails with a 403 error when trying to fetch paperMC from papermc.io.

  • Bug report ID
    486cd0df-8498-4516-8092-e60506831654

Steps to reproduce

  1. run sudo dietpi-software reinstall 181

Expected behaviour

  • paperMC minecraft server should be reinstalled in the most recent publicly available stable version

Actual behaviour

Command: curl -sSfL https://papermc.io/api/v2/projects/paper/versions//builds//downloads/paper--.jar -o paper--.jar

  • Exit code: 22
  • DietPi version: v9.9.0 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 3 | DISTRO: 6
  • Error log: curl: (22) The requested URL returned error: 403
MichaIng added a commit that referenced this issue Jan 6, 2025
- DietPi-Software | PaperMC: Resolved an issue where the installation failed, because the API URL changed. Many thanks to @onkeld for reporting this issue: #7349
@MichaIng
Copy link
Owner

MichaIng commented Jan 6, 2025

Many thanks for reporting. The API URL changed from a sub path to a sub domain 😄. Fixed with: 8fd0327

I wonder whether it is worth a live patch. As of the small change, it would be an easy one 🤔. So people do not need to next DietPi release.

@MichaIng MichaIng added this to the v9.10 milestone Jan 6, 2025
MichaIng added a commit that referenced this issue Jan 6, 2025
- Live patch 3 | Fix PaperMC installation: #7349
MichaIng added a commit that referenced this issue Jan 6, 2025
- Live patch 3 | Fix PaperMC installation: #7349
@MichaIng MichaIng linked a pull request Jan 6, 2025 that will close this issue
@MichaIng
Copy link
Owner

MichaIng commented Jan 6, 2025

Okay, while the live patch works, there is a dedicated issue, which cannot be patched that easily: Minecraft 1.20.5 and above requires Java 21, available on Debian Trixie only. So we need to install v1.20.4 in that case. So the live patch does not make sense: We fix the download, but the service won't start successfully on Bullseye and Bookworm systems. I fixed it for upcoming DietPi release: e0430a7

@MichaIng
Copy link
Owner

MichaIng commented Jan 7, 2025

Hmm, pinning older Minecraft version is now awesome either. But installing new Java versions on older Debian is as well not that trivial, and can conflict with other software titles. Though we have a request for this very reason: #4505

... wait, it has become much easier now to install other Java versions: #4505 (comment)

@Jakesta13
Copy link

Just commenting here to just express how crazy such a tiny change is so disruptive to many different projects .. it took me embarrassingly long to find out why my personal server wasn't working.

I had just updated my own script that updates my own server and set it to run the next day... The next day happened to be when they changed the API ... Took me a day or two to realize why my server wasn't working and that it was only downloading 0kb paper jar files 🤦

@MichaIng
Copy link
Owner

MichaIng commented Jan 8, 2025

Yeah, for APIs this is especially nasty 😄. Would have been trivial to add a redirect, and inform people through other channels about the deprecated old URL. Though I cannot rule out this has happened, and we just missed it. There is no real way to add deprecation messages to the API itself, without distorting the output either.

If you actually stored the empty response, then I suggest to update your script. E.g. in case of curl, use the -f flag to print the HTTP error to STDERR, and use -o to store the actual response body, if there is any and no error, instead of shell redirect >. This way you see such errors in the output and store content only on successfull 2xx responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution available 🥂 Definite solution has been done Upstream change
Projects
None yet
3 participants