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

[ERROR] Failed to auto-install CurseForge modpack #3275

Closed
ZeroNyte opened this issue Jan 23, 2025 · 10 comments
Closed

[ERROR] Failed to auto-install CurseForge modpack #3275

ZeroNyte opened this issue Jan 23, 2025 · 10 comments

Comments

@ZeroNyte
Copy link

ZeroNyte commented Jan 23, 2025

Describe the problem

just as title says, followed the documentation and videos for the compose file and keeps giving this error.

trying to use a local custom modpack I made on the curseforge launcher.

Container definition

services:
  mc:
    image: itzg/minecraft-server
    container_name: N3K0-server
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      MODPACK_PLATFORM: AUTO_CURSEFORGE
      CF_SERVER_MOD: E:\Docker\N3K0server\N3K0.zip
      CF_SLUG: "custom"
      CF_API_KEY: $$2a$$10$-------
      MEMORY: 4G
    volumes:
      # attach the relative directory 'data' to the container's /data path
      - E:\docker\N3K0server\data:/data

Container logs

2025-01-23 16:16:09 N3K0-server  | [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxrwx 1 1000 1000 4096 Jan 23 15:11 /data'
2025-01-23 16:16:11 N3K0-server  | [mc-image-helper] 15:16:11.917 ERROR : 'install-curseforge' command failed. Version is 1.40.11
2025-01-23 16:16:11 N3K0-server  | me.itzg.helpers.errors.GenericException: No mods found with slug=custom
2025-01-23 16:16:11 N3K0-server  |      at me.itzg.helpers.curseforge.CurseForgeApiClient.lambda$searchMod$2(CurseForgeApiClient.java:148)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:113)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
2025-01-23 16:16:11 N3K0-server  |      at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
2025-01-23 16:16:11 N3K0-server  |      at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
2025-01-23 16:16:11 N3K0-server  |      at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
2025-01-23 16:16:11 N3K0-server  |      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2025-01-23 16:16:11 N3K0-server  |      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2025-01-23 16:16:11 N3K0-server  |      at java.base/java.lang.Thread.run(Unknown Source)
2025-01-23 16:16:11 N3K0-server  |      Suppressed: java.lang.Exception: #block terminated with an error
2025-01-23 16:16:11 N3K0-server  |              at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
2025-01-23 16:16:11 N3K0-server  |              at reactor.core.publisher.Mono.block(Mono.java:1779)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.curseforge.CurseForgeInstaller.installByRetrievingModpackZip(CurseForgeInstaller.java:255)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$install$3(CurseForgeInstaller.java:182)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:228)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:181)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:222)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:30)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine.access$1500(CommandLine.java:148)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
2025-01-23 16:16:11 N3K0-server  |              at picocli.CommandLine.execute(CommandLine.java:2174)
2025-01-23 16:16:11 N3K0-server  |              at me.itzg.helpers.McImageHelper.main(McImageHelper.java:169)
2025-01-23 16:16:12 N3K0-server  | [init] [ERROR] Failed to auto-install CurseForge modpack 
2036-01-01 00:00:00 
N3K0-server exited with code 1
@itzg
Copy link
Owner

itzg commented Jan 23, 2025

For a local, unpublished modpack

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#unpublished-modpacks

You haven't set CF_MODPACK_ZIP or CF_MODPACK_MANIFEST

@ZeroNyte
Copy link
Author

ZeroNyte commented Jan 23, 2025

So then it should be like this right?

services:
  mc:
    image: itzg/minecraft-server
    container_name: N3K0-server
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      MODPACK_PLATFORM: AUTO_CURSEFORGE
      CF_MODPACK_ZIP: E:\Docker\N3K0server\N3K0.zip
      CF_MODPACK_MANIFEST: E:\Docker\N3K0server\manifest\manifest.json
      CF_SLUG: "custom"
      CF_API_KEY: $$2a$$-------
      MEMORY: 4G
    volumes:
      # attach the relative directory 'data' to the container's /data path
      - E:\docker\N3K0server\data:/data
      - E:\docker\N3K0server\manifest:/manifests:ro

@ZeroNyte
Copy link
Author

ZeroNyte commented Jan 23, 2025

also, with the ZIP file, is it just the export ZIP when you export on curseforge? or the complete folder of the modpack you have to zip?

and locally stored icon, tried that too, but nothing?

@itzg
Copy link
Owner

itzg commented Jan 23, 2025

Set one or the other. Yes, the zip is the export from CurseForge client app.

@ZeroNyte
Copy link
Author

still getting that error.

current compose file:

services:
  mc:
    image: itzg/minecraft-server
    container_name: N3K0-server
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      MODPACK_PLATFORM: AUTO_CURSEFORGE
      CF_MODPACK_ZIP: E:\Docker\N3K0server\N3K0.zip
      CF_MODPACK_MANIFEST: E:\Docker\N3K0server\manifest.json
      CF_SLUG: "custom"
      CF_API_KEY: $$2a$$10$$----------------------------------------
      MEMORY: 4G
    volumes:
      # attach the relative directory 'data' to the container's /data path
      - E:\docker\N3K0server\data:/data
      - E:\docker\N3K0server\manifest:/manifests:ro

Container log:

N3K0-server  | 2025-01-23T18:00:39.450471110Z [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxrwx 1 1000 1000 4096 Jan 23 17:58 /data'
2025-01-23 19:00:40 N3K0-server  | [mc-image-helper] 18:00:40.947 ERROR : 'install-curseforge' command failed. Version is 1.40.11
2025-01-23 19:00:40 N3K0-server  | me.itzg.helpers.errors.GenericException: Failed to setup API caching: E:\Docker\N3K0server\N3K0.zip
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:233)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.CurseForgeInstaller.installFromModpackZip(CurseForgeInstaller.java:136)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:218)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:30)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine.access$1500(CommandLine.java:148)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
2025-01-23 19:00:40 N3K0-server  |      at picocli.CommandLine.execute(CommandLine.java:2174)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.McImageHelper.main(McImageHelper.java:169)
2025-01-23 19:00:40 N3K0-server  | Caused by: java.nio.file.NoSuchFileException: E:\Docker\N3K0server\N3K0.zip
2025-01-23 19:00:40 N3K0-server  |      at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
2025-01-23 19:00:40 N3K0-server  |      at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
2025-01-23 19:00:40 N3K0-server  |      at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
2025-01-23 19:00:40 N3K0-server  |      at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(Unknown Source)
2025-01-23 19:00:40 N3K0-server  |      at java.base/java.nio.channels.FileChannel.open(Unknown Source)
2025-01-23 19:00:40 N3K0-server  |      at java.base/java.nio.channels.FileChannel.open(Unknown Source)
2025-01-23 19:00:40 N3K0-server  |      at org.apache.commons.compress.archivers.zip.ZipFile.openZipChannel(ZipFile.java:501)
2025-01-23 19:00:40 N3K0-server  |      at org.apache.commons.compress.archivers.zip.ZipFile.access$000(ZipFile.java:89)
2025-01-23 19:00:40 N3K0-server  |      at org.apache.commons.compress.archivers.zip.ZipFile$Builder.get(ZipFile.java:159)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.CurseForgeInstaller.extractModpackManifest(CurseForgeInstaller.java:987)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$installFromModpackZip$0(CurseForgeInstaller.java:137)
2025-01-23 19:00:40 N3K0-server  |      at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:228)
2025-01-23 19:00:40 N3K0-server  |      ... 12 common frames omitted
2025-01-23 19:00:41 N3K0-server  | [init] [ERROR] Failed to auto-install CurseForge modpack

@ZeroNyte
Copy link
Author

ZeroNyte commented Jan 23, 2025

this is with the export/share profile. and same happened when I put the modpack in a zip.

and with the manifest, should it be in the zip file or just in the folder with the compose file etc.

@itzg
Copy link
Owner

itzg commented Jan 23, 2025

It can't access a host path like E:\Docker\N3K0server\N3K0.zip from within a container. You need to mount that path as a volume and reference the mounted path in the variable.

Note the highlighted text:

Image

@ZeroNyte
Copy link
Author

ZeroNyte commented Jan 23, 2025

huh, but then it E:/---- has to be ./folder or ./filename, right? but doesnt seem to work. tried looking it up with how to mount, and everything comes out like ./location, but also doesnt work. just idk

services:
  mc:
    image: itzg/minecraft-server
    container_name: N3K0-server
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      MODPACK_PLATFORM: AUTO_CURSEFORGE
      CF_MODPACK_ZIP: ./N3K0.zip
      CF_MODPACK_MANIFEST: ./manifest.json
      CF_SLUG: "N3K0"
      CF_API_KEY: $$2a$$10$$c5/nNBdOfJkOhT5tq73t5OtEgy3s0af5dYvnNtCD4aVVfW0G6VZjq
      MEMORY: 4G
    volumes:
      # attach the relative directory 'data' to the container's /data path
      - ./data:/data
      - ./manifest:/manifests:ro

otherwise I really don't know what to change/add

@rhullah
Copy link
Contributor

rhullah commented Jan 23, 2025

Since you have the modpack files in the ./manifest folder on the host, that translates to /manifests in the container (just note: you have that in the plural form). So then for your two environment variables, you would want them to be /manifests/N3K0.zip and /manifests/manifest.json.

@ZeroNyte
Copy link
Author

well.. removed the . from the ./file and now it works without problems.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants