Open ElektroVirus opened 2 years ago
Thanks for issue report. Looks like 274 is an infamous resource
https://github.com/itzg/docker-minecraft-server/issues/1307#issuecomment-1022674250
I'll see if there's something I can do in the script to detect the incorrect resource download and provide a more descriptive message.
Thank you!
It looks like this is going to an external download which is the issue:
curl -v -fsSL -H "User-Agent: itzg/minecraft-server" "https://api.spiget.org/v2/resources/274/download";
...
location: https://dev.bukkit.org/projects/dynmap/files/3670362
However what you really want is https://dev.bukkit.org/projects/dynmap/files/3670362/download so I guess adding /download to the end if you see dev.bukkit.org might work to make the leap?
Then you get location: https://edge.forgecdn.net/files/3670/362/Dynmap-3.4-beta-2-spigot.jar
and the file written out.
This is a bit more complicated than I can take a quick swing at in https://github.com/itzg/docker-minecraft-server/blob/master/scripts/start-spiget#L89 although I want to provide the troubleshooting I'd already went through.
Thanks @toddejohnson for the investigation. I have opened the issue above with spiget to see if it is something that can be corrected on their end.
@ElektroVirus @toddejohnson , spiget maintainer confirmed that dynmap needs to fix the download link on their side. Please report an issue with them.
In the meantime I'll need to blacklist their resource ID since it is non-compliant.
Thanks! I posted an issue here: https://github.com/webbukkit/dynmap/issues/3705
I'll have it better detect a non-zip download and direct the user to the download page to ensure the authors can monetize appropriately.
It would be great to detect html in the download before unzipping. That would be universal for other broken packages. Perhaps filter content type from the curl output?
Thanks! I posted an issue here: webbukkit/dynmap#3705
Update: the issue is now closed for being a duplicate of https://github.com/webbukkit/dynmap/issues/3638 (as for this thread, I tried searching for duplicates but didn't find it).
So apparently is a feature rather than bug, because the download page is their only trivial monetization.
I'll have it better detect a non-zip download and direct the user to the download page to ensure the authors can monetize appropriately.
Yes, that sounds good. I just hope the installation instructions are not much different for this Docker-container than for a traditional install.
I actually tried to install Dynmap the traditional way by copying it into the podman-container, unsuccessfully. It was only after this that I discovered the spiget-api method.
I'll have it better detect a non-zip download and direct the user to the download page to ensure the authors can monetize appropriately.
Yes, that sounds good. I just hope the installation instructions are not much different for this Docker-container than for a traditional install.
I actually tried to install Dynmap the traditional way by copying it into the podman-container, unsuccessfully. It was only after this that I discovered the spiget-api method.
Yes, you'll need to pre-download and stage the plugin file. I don't know what you mean by traditional way, but this image has several ways to accommodate, such as
https://github.com/itzg/docker-minecraft-server#optional-plugins-mods-and-config-attach-points
Given the discussion with the mod author, the latest image doesn't "fix" the download of Dynmap; however, it does detect the external download scenario and provides the link registered with the resource:
[init] Downloading resource 274 ...
[mc-image-helper] 19:26:28.477 ERROR : 'get' command failed: Unexpected content type 'text/html', expected any of [application/zip, application/java-archive]
[init] ERROR: failed to download resource '274' from https://api.spiget.org/v2/resources/274/download
[init] Visit https://dev.bukkit.org/projects/dynmap/files/3670362 to pre-download the resource
[init] instead of using SPIGET_RESOURCES
For clarification, does this mean I will need to manually redownload dynmap and move it into my minecraft pod every time I restart my server?
@h3mmy I've been using the below to get Dynmap and LuckPerms although the command needs updated on new versions:
-e MODS=https://download.luckperms.net/1462/bukkit/loader/LuckPerms-Bukkit-5.4.54.jar,https://dynmap.us/builds/dynmap/Dynmap-3.5-beta-1-spigot.jar
Thanks! I had come up with https://mediafilez.forgecdn.net/files/4167/109/Dynmap-3.5-beta-1-spigot.jar
. I'm glad there's more options.
@h3mmy I've been using the below to get Dynmap and LuckPerms although the command needs updated on new versions:
-e MODS=https://download.luckperms.net/1462/bukkit/loader/LuckPerms-Bukkit-5.4.54.jar,https://dynmap.us/builds/dynmap/Dynmap-3.5-beta-1-spigot.jar
Just to say that this worked for me, added the following to Enviroments via Portainer and removed 274 from SPIGET_RESOURCES
MODS | https://dynmap.us/builds/dynmap/Dynmap-3.5-beta-1-spigot.jar -- | --Server back up with Dynmap working
Describe the problem
I tried to install Dynmap link to dynmap at spigotmc.org using the SPIGET_RESOURCES automatically download method described in link to README.
As you can see, the dynmap link ends with "274" so I put in my podman run script file
-e SPIGET_RESOURCES=274
. However, after starting the server I get an error inpodman logs
:Thanks for this docker image! Its awesome and simple to setup with so much versatility. This problem is not neccessarily a bug in this container but rather with packaging the dynmap, but I just wanted to inform you.
Container definition
Container logs