Closed mgrinspan closed 4 months ago
So far I am finding it will be non-trivial to fix this. The invalid URL is caused by a redirect being processed within a library used by my tool
It's really not a valid URL even though, yes, there's a "common practice" of fixing up square brackets that people incorrectly include in URLs. The mod or modpack author should really fix their metadata. I'll take a little more time to investigate, but I will quickly get annoyed having to work around other people's mistakes.
I hadn't considered that it could be a redirect and therefore somewhat out of your control, that's very unfortunate. Would it instead be possible to handle the URISyntaxException
(and maybe other exceptions) similarly to mods that don't allow automated downloading? If I recall correctly, that system spits out a list of mods to download manually and then resumes gracefully afterwards.
Speaking of which, the only practical solution I can think is for you to pre-download that particular one and put it in /downloads
directory attached to the container
The startup should grab the file form there rather than attempting to download.
I've tried that, but it still attempts to download the mod in question. Is there some sort of naming convention? I'm sure I'm doing something wrong but I can't figure out what.
It turns out I remembered the logic wrong. It was only looking in downloads directory when the mod didn't declare a URL. I'm working on enhancing that now.
After this build pushes, re-pull the image and see if that also solves the download directory approach for you
https://github.com/itzg/docker-minecraft-server/actions/runs/9921068538
Unfortunately that doesn't seem to have made a difference.
Hmm, that's odd. For comparison here's the compose file I'm using:
services:
mc:
image: itzg/minecraft-server:java8
ports:
- "25565:25565"
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/meatballcraft
# from .env
CF_API_KEY: ${CF_API_KEY}
MEMORY: 4G
volumes:
- ./downloads:/downloads:ro
- data:/data
volumes:
data:
and my file setup looks like
...after that it looks like there's an unrelated bug I'm seeing that I'll investigate:
mc-1 | [mc-image-helper] 16:08:33.732 ERROR : 'install-curseforge' command failed. Version is 1.39.4
mc-1 | java.lang.IllegalArgumentException: 'other' is different type of Path
mc-1 | at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
mc-1 | at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
mc-1 | at me.itzg.helpers.files.Manifests.lambda$relativizeAll$1(Manifests.java:94)
Ah, I had the mods in /downloads/mods
not /downloads
. I'm also getting that same error now.
Worth noting: the ItemFavorites mod doesn't seem to have been copied to the mods folder
Yep it turns out you're seeing symptoms of the new bug I found :)
This build should fix the remaining issues. /downloads/mods
will be correctly usable with this too.
https://github.com/itzg/docker-minecraft-server/actions/runs/9922092016
Thank you! It all works now
Describe the problem
While trying to auto download the "meatballcraft" modpack, the server crashes with the error
This seems fixable via this SO solution or otherwise URL encoding brackets in URLs (
[ -> %5B
and] -> %5D
to be specific)Container definition
Container logs