Skip to content

Declaring a Neoforge mod via Modrinth; claims no forge version available for neoforge mod #2658

@itzg

Description

@itzg

Discussed in #2657

Originally posted by Toukun February 12, 2024

Problem

Using itzg/minecraft-server docker image, while passing the following environment.

version: "3.8"

services:
  mc:
    image: itzg/minecraft-server
    ...
    environment:
        ...
        EULA: "TRUE"
        TYPE: NEOFORGE
        VERSION: "1.20.4"
        NEOFORGE_VERSION: "20.4.80"
        MODRINTH_PROJECTS: toukun-mod

We get the following errors.

minecraft-mc-1  | [mc-image-helper] 16:04:03.348 DEBUG : Invalid parameter details
minecraft-mc-1  | me.itzg.helpers.errors.InvalidParameterException: No files are available for the project OoQc6URx for loader forge and Minecraft version 1.20.4
minecraft-mc-1  |       at me.itzg.helpers.modrinth.ModrinthApiClient.lambda$getVersionsForProject$8(ModrinthApiClient.java:185)
minecraft-mc-1  |       at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
minecraft-mc-1  |       at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245)
minecraft-mc-1  |       at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305)
minecraft-mc-1  |       at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
minecraft-mc-1  |       at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:113)
minecraft-mc-1  |       at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158)
minecraft-mc-1  |       at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
minecraft-mc-1  |       at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
minecraft-mc-1  |       at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
minecraft-mc-1  |       at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
minecraft-mc-1  |       at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
minecraft-mc-1  |       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
minecraft-mc-1  |       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
minecraft-mc-1  |       at java.base/java.lang.Thread.run(Unknown Source)
minecraft-mc-1  |       Suppressed: java.lang.Exception: #block terminated with an error
minecraft-mc-1  |               at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:103)
minecraft-mc-1  |               at reactor.core.publisher.Mono.block(Mono.java:1712)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.getVersionsForProject(ModrinthCommand.java:249)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.resolveProjectVersion(ModrinthCommand.java:304)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.processProject(ModrinthCommand.java:271)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.lambda$processProjects$0(ModrinthCommand.java:117)
minecraft-mc-1  |               at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
minecraft-mc-1  |               at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
minecraft-mc-1  |               at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
minecraft-mc-1  |               at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
minecraft-mc-1  |               at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
minecraft-mc-1  |               at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
minecraft-mc-1  |               at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.processProjects(ModrinthCommand.java:118)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.call(ModrinthCommand.java:92)
minecraft-mc-1  |               at me.itzg.helpers.modrinth.ModrinthCommand.call(ModrinthCommand.java:41)
minecraft-mc-1  |               at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
minecraft-mc-1  |               at picocli.CommandLine.access$1500(CommandLine.java:148)
minecraft-mc-1  |               at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
minecraft-mc-1  |               at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
minecraft-mc-1  |               at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
minecraft-mc-1  |               at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
minecraft-mc-1  |               at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
minecraft-mc-1  |               at picocli.CommandLine.execute(CommandLine.java:2170)
minecraft-mc-1  |               at me.itzg.helpers.McImageHelper.main(McImageHelper.java:159)
minecraft-mc-1 exited with code 2

Reproduction Steps

  1. Create a docker-compose.yml that includes the above variables.
  2. Attempt to docker compose up the container.
  3. See the above ever as the container exits with code 2.

Expected Result

The mod downloads and the container runs successfully.

In what configuration did this work?

Previously, I had a MODS variable in my enviornment that linked directly to the mod, and this worked fine. Once I got my mod listed on Modrinth, I wanted to switch from using a hardcoded github url for release to the nice auto-download for Modrinth.

Additional testing done

I also tried a full clean of my local image with the following chain of commands.

docker-compose stop
docker-compose rm -f
docker-compose pull   
docker-compose up -d

I tried setting the MODRINTH_LOADER variable to neoforge, which didn't change the outcome.
I assumed this was merged with #2643.

If I was mistaken and this was not released, let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions