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

Curseforge custom modpacks #3240

Open
bovealexandre opened this issue Jan 8, 2025 · 3 comments
Open

Curseforge custom modpacks #3240

bovealexandre opened this issue Jan 8, 2025 · 3 comments

Comments

@bovealexandre
Copy link

Describe the problem

When attempting to set up a Minecraft server with a custom modpack, the process fails at multiple steps due to missing or corrupt files.

  1. Missing Start script/Forge JAR
    The modpack ZIP file does not include the necessary start script or forge jar files required to initialize the server.
    This prevents the server from being started directly after unzipping.

Solution : Put it manually in the zip file

  1. Missing forge server file
    Same as above, it can't find the server file in libraries/**/forge-1.20.1-47.3.22-server.jar

  2. Corrupt server file
    Error: Invalid or corrupt jarfile forge-1.20.1-47.3.22-server.jar

Container definition

services:
  minecraft:
    container_name: pandora
    image: itzg/minecraft-server
    ports:
      - "25565:25565"
      - "25575:25575"
    environment:
      EULA: "TRUE"
      TYPE: CURSEFORGE
      VERSION: 1.20.1
      CF_SERVER_MOD: /modpacks/Pandora.zip
      MEMORY: 8G
      USE_MODPACK_START_SCRIPT: "FALSE"
    volumes:
      - ./minecraft_data:/data
      - ./modpacks/pandora:/modpacks:ro
    restart: unless-stopped
    tty: true
    stdin_open: true
    healthcheck:
      test: bash -x mc-health

Container logs

pandora  | + mcServerRunnerArgs=(--stop-duration "${STOP_DURATION:-60}s")                                                                                                                                                                           
pandora  | + isTrue false                                                                                                                                                                                                                           
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + isTrue ''
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + [[ CURSEFORGE == \C\U\R\S\E\F\O\R\G\E ]]                                                                                                                                                                                               
pandora  | + [[ -n /data/FeedTheBeast/forge-1.20.1-47.3.22-server.jar ]]                                                                                                                                                                            
pandora  | + copyFilesForCurseForge                                                                                                                                                                                                                 
pandora  | + '[' '!' -e /data/FeedTheBeast/server-icon.png ']'                                                                                                                                                                                      
pandora  | + '[' -e /data/server-icon.png ']'                                                                                                                                                                                                       
pandora  | + cp -f /data/eula.txt /data/FeedTheBeast/                                                                                                                                                                                               
pandora  | + cd /data/FeedTheBeast
pandora  | + log 'Starting CurseForge server in /data/FeedTheBeast...'                                                                                                                                                                              
pandora  | + local oldState                                                                                                                                                                                                                         
pandora  | ++ shopt -po xtrace                                                                                                                                                                                                                      
pandora  | + oldState='set -o xtrace'                                                                                                                                                                                                               
pandora  | + shopt -u -o xtrace                                                                                                                                                                                                                     
pandora  | [init] 2025-01-08 13:42:32+00:00 Starting CurseForge server in /data/FeedTheBeast...                                                                                                                                                     
pandora  | + isTrue false                                                                                                                                                                                                                           
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | ++ basename /data/FeedTheBeast/forge-1.20.1-47.3.22-server.jar
pandora  | + exec mc-server-runner --stop-duration 60s java -Xmx8G -Xms8G -jar forge-1.20.1-47.3.22-server.jar                                                                                                                                      
pandora  | Error: Invalid or corrupt jarfile forge-1.20.1-47.3.22-server.jar                                                                                                                                                                        
pandora  | 2025-01-08T13:42:32.695Z     WARN    mc-server-runner        Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.        {"exitCode": 1}                                     
pandora  | 2025-01-08T13:42:32.695Z     INFO    mc-server-runner        Done                                                                                                                                                                        
pandora exited with code 0
@itzg
Copy link
Owner

itzg commented Jan 8, 2025

As stated in the docs, TYPE=CURSEFORGE is no longer actively supported. Switch to AUTO_CURSEFORGE.

@bovealexandre
Copy link
Author

How to make custom modpack that are not published work?

Here are the logs

pandora  | + export HOME=/data
pandora  | + HOME=/data
pandora  | ++ id -u                                                                                                                                                                                                                                 
pandora  | ++ id -g                                                                                                                                                                                                                                 
pandora  | ++ ls -lnd /data                                                                                                                                                                                                                         
pandora  | + log 'Running as uid=1000 gid=1000 with /data as '\''drwxr-xr-x 1 1000 1000 4096 Jan  8  2025 /data'\'''                                                                                                                                
pandora  | + local oldState                                                                                                                                                                                                                         
pandora  | ++ shopt -po xtrace
pandora  | + oldState='set -o xtrace'                                                                                                                                                                                                               
pandora  | + shopt -u -o xtrace                                                                                                                                                                                                                     
pandora  | [init] 2025-01-08 13:57:04+00:00 Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 1 1000 1000 4096 Jan  8  2025 /data'                                                                                                             
pandora  | + '[' '!' -e /data/eula.txt ']'                                                                                                                                                                                                          
pandora  | + isTrue false                                                                                                                                                                                                                           
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + isTrue true                                                                                                                                                                                                                            
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 0                                                                                                                                                                                                                               
pandora  | + set +x                                                                                                                                                                                                                                 
pandora  | + isTrue false
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + isTrue false                                                                                                                                                                                                                           
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + fixJavaPath
pandora  | + which java                                                                                                                                                                                                                             
pandora  | + cd /data                                                                                                                                                                                                                               
pandora  | + export DECLARED_TYPE=AUTO_CURSEFORGE                                                                                                                                                                                                   
pandora  | + DECLARED_TYPE=AUTO_CURSEFORGE                                                                                                                                                                                                          
pandora  | + export DECLARED_VERSION=1.20.1                                                                                                                                                                                                         
pandora  | + DECLARED_VERSION=1.20.1
pandora  | + isTrue false                                                                                                                                                                                                                           
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + isTrue false                                                                                                                                                                                                                           
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + [[ -n '' ]]
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + : ''                                                                                                                                                                                                                                   
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + case "${TYPE^^}" in                                                                                                                                                                                                                    
pandora  | + MODPACK_PLATFORM=AUTO_CURSEFORGE
pandora  | + [[ -n AUTO_CURSEFORGE ]]                                                                                                                                                                                                               
pandora  | + case "${MODPACK_PLATFORM^^}" in                                                                                                                                                                                                        
pandora  | + exec /start-deployAutoCF                                                                                                                                                                                                               
pandora  | + ensureRemoveAllModsOff MODPACK_PLATFORM=AUTO_CURSEFORGE                                                                                                                                                                                
pandora  | + reason=MODPACK_PLATFORM=AUTO_CURSEFORGE                                                                                                                                                                                                
pandora  | + isTrue false
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 1                                                                                                                                                                                                                               
pandora  | + args=(--results-file="$resultsFile" --force-synchronize="$CF_FORCE_SYNCHRONIZE" --force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER" --overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING")                                   
pandora  | + setArg --modpack-page-url CF_PAGE_URL                                                                                                                                                                                                  
pandora  | + arg=--modpack-page-url                                                                                                                                                                                                                 
pandora  | + var=CF_PAGE_URL                                                                                                                                                                                                                        
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --file-id CF_FILE_ID
pandora  | + arg=--file-id                                                                                                                                                                                                                          
pandora  | + var=CF_FILE_ID                                                                                                                                                                                                                         
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --slug CF_SLUG                                                                                                                                                                                                                  
pandora  | + arg=--slug                                                                                                                                                                                                                             
pandora  | + var=CF_SLUG                                                                                                                                                                                                                            
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --modpack-manifest CF_MODPACK_MANIFEST
pandora  | + arg=--modpack-manifest                                                                                                                                                                                                                 
pandora  | + var=CF_MODPACK_MANIFEST                                                                                                                                                                                                                
pandora  | + [[ -n /data/modpack/manifest.json ]]                                                                                                                                                                                                   
pandora  | + args+=("${arg}=${!var}")                                                                                                                                                                                                               
pandora  | + setArg --filename-matcher CF_FILENAME_MATCHER                                                                                                                                                                                          
pandora  | + arg=--filename-matcher
pandora  | + var=CF_FILENAME_MATCHER                                                                                                                                                                                                                
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --set-level-from CF_SET_LEVEL_FROM                                                                                                                                                                                              
pandora  | + arg=--set-level-from                                                                                                                                                                                                                   
pandora  | + var=CF_SET_LEVEL_FROM                                                                                                                                                                                                                  
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --overrides-exclusions CF_OVERRIDES_EXCLUSIONS                                                                                                                                                                                  
pandora  | + arg=--overrides-exclusions                                                                                                                                                                                                             
pandora  | + var=CF_OVERRIDES_EXCLUSIONS                                                                                                                                                                                                            
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --ignore-missing-files CF_IGNORE_MISSING_FILES                                                                                                                                                                                  
pandora  | + arg=--ignore-missing-files                                                                                                                                                                                                             
pandora  | + var=CF_IGNORE_MISSING_FILES                                                                                                                                                                                                            
pandora  | + [[ -n '' ]]
pandora  | + setArg --api-cache-default-ttl CF_API_CACHE_DEFAULT_TTL                                                                                                                                                                                
pandora  | + arg=--api-cache-default-ttl                                                                                                                                                                                                            
pandora  | + var=CF_API_CACHE_DEFAULT_TTL                                                                                                                                                                                                           
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --exclude-mods CF_EXCLUDE_MODS                                                                                                                                                                                                  
pandora  | + arg=--exclude-mods                                                                                                                                                                                                                     
pandora  | + var=CF_EXCLUDE_MODS
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --force-include-mods CF_FORCE_INCLUDE_MODS                                                                                                                                                                                      
pandora  | + arg=--force-include-mods                                                                                                                                                                                                               
pandora  | + var=CF_FORCE_INCLUDE_MODS                                                                                                                                                                                                              
pandora  | + [[ -n '' ]]                                                                                                                                                                                                                            
pandora  | + setArg --exclude-include-file CF_EXCLUDE_INCLUDE_FILE                                                                                                                                                                                  
pandora  | + arg=--exclude-include-file
pandora  | + var=CF_EXCLUDE_INCLUDE_FILE                                                                                                                                                                                                            
pandora  | + [[ -n /image/cf-exclude-include.json ]]                                                                                                                                                                                                
pandora  | + args+=("${arg}=${!var}")                                                                                                                                                                                                               
pandora  | + setArg --downloads-repo CF_DOWNLOADS_REPO                                                                                                                                                                                              
pandora  | + arg=--downloads-repo                                                                                                                                                                                                                   
pandora  | + var=CF_DOWNLOADS_REPO                                                                                                                                                                                                                  
pandora  | + [[ -n '' ]]
pandora  | + mc-image-helper install-curseforge --results-file=/data/.install-curseforge.env --force-synchronize=false --force-reinstall-modloader=false --overrides-skip-existing=false --modpack-manifest=/data/modpack/manifest.json --exclude-include-file=/image/cf-exclude-include.json                                                                                                                                                                                                           
pandora  | A modpack page URL or slug identifier is required even with a provided modpack manifest
pandora  | + logError 'Failed to auto-install CurseForge modpack'
pandora  | + isDebugging
pandora  | + isTrue TRUE                                                                                                                                                                                                                            
pandora  | + case "${1,,}" in                                                                                                                                                                                                                       
pandora  | + return 0                                                                                                                                                                                                                               
pandora  | + set +x                                                                                                                                                                                                                                 
pandora  | [init] 2025-01-08 13:57:05+00:00 [ERROR] Failed to auto-install CurseForge modpack                                                                                                                                                       
pandora  | + exit 1
pandora exited with code 0

@itzg
Copy link
Owner

itzg commented Jan 8, 2025

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

2 participants