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

Invalid parameter provided for 'install-curseforge' command: #3251

Open
LamaFahrrad opened this issue Jan 13, 2025 · 8 comments
Open

Invalid parameter provided for 'install-curseforge' command: #3251

LamaFahrrad opened this issue Jan 13, 2025 · 8 comments

Comments

@LamaFahrrad
Copy link

Describe the problem

When i try to docker compose up my .yml file i always get this error. I doubled the $ signs in my API Key.

[mc-image-helper] 20:29:41.458 ERROR : Invalid parameter provided for 'install-curseforge' command: Access to https://api.curseforge.com is forbidden or rate-limit has been exceeded. Ensure CF_API_KEY is set to a valid API key from https://console.curseforge.com/ or allow rate-limit to reset.
mc-1 | [init] [ERROR] Failed to auto-install CurseForge modpack

Container definition

services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
CF_API_KEY: '$$2a$$10$$....'
TYPE: AUTO_CURSEFORGE
MEMORY: 10G
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-10

volumes:
  # attach the relative directory 'data' to the container's /data path
  - ./data:/data

Container logs

Paste logs here
@itzg
Copy link
Owner

itzg commented Jan 13, 2025

If you're sure the API key is valid (thanks for confirming the escaped dollar signs) then it must be the rate-limit, as mentioned in the error:

ERROR : Invalid parameter provided for 'install-curseforge' command: Access to https://api.curseforge.com/ is forbidden or rate-limit has been exceeded. Ensure CF_API_KEY is set to a valid API key from https://console.curseforge.com/ or allow rate-limit to reset.

@Ingraved
Copy link

I see the same. It appears to be hitting a rate limit. I think i can 'trick' it into downloading more when I restart the container.

[mc-image-helper] 00:39:26.532 WARN  : Retrying to download BrandonsCore-1.20.1-3.2.1.302-universal.jar @ Brandon's Core:Brandons Core 1.20.1-3.2.1.302
[mc-image-helper] 00:39:26.537 WARN  : Retrying to download L_Enders_Cataclysm-2.31- 1.20.1.jar @ L_Ender 's Cataclysm:L_Enders_Cataclysm-2.31- 1.20.1.jar
[mc-image-helper] 00:39:26.545 INFO  : Downloaded mod file mods/Draconic-Evolution-1.20.1-3.1.2.598-universal.jar
[mc-image-helper] 00:39:26.574 INFO  : Excluding mod file 'Just Enough Mekanism Multiblocks' (just-enough-mekanism-multiblocks) due to configuration
[mc-image-helper] 00:39:26.574 WARN  : Retrying to download blue_skies-1.20.1-1.3.31.jar @ Blue Skies:Blue Skies: Population 1.20.1-v1.3.31
[mc-image-helper] 00:39:26.660 INFO  : Downloaded mod file mods/Croptopia-1.20.1-FORGE-3.0.4.jar
[mc-image-helper] 00:39:26.689 ERROR : Invalid parameter provided for 'install-curseforge' command: Access to https://api.curseforge.com is forbidden or rate-limit has been exceeded. Ensure CF_API_KEY is set to a valid API key from https://console.curseforge.com/ or allow rate-limit to reset.

[init] [ERROR] Failed to auto-install CurseForge modpack

This is for docker compose running in portainer.

services:
  mc:
    image: itzg/minecraft-server
    ports:
      - "25565:25565"
    environment:
      EULA: "true"
      MODPACK_PLATFORM: AUTO_CURSEFORGE
      # allocate from https://console.curseforge.com/ and set in .env file
      CF_API_KEY: ${CF_API_KEY} # $$2a$$10$$...
      CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9
      # Optional: select a specific version/file
      #CF_FILENAME_MATCHER: "0.2.34"
      MEMORY: 8G
    volumes:
      - mc-data:/data

@Ingraved
Copy link

Follow up, I was able to get everything running after restarting the container about a dozen times.

@itzg
Copy link
Owner

itzg commented Jan 14, 2025

I have it cache the API calls across restarts, so that would explain why it eventually finished up for you @Ingraved

I'm now wondering if they impose different rate limits for different regions.

@LamaFahrrad
Copy link
Author

Ok, how can i change the rate-limit? So my only option is to restart the cointainer until it works? :D

@Mikael2112
Copy link

I have the same problem, how can I change de rate

ERROR : Invalid parameter provided for 'install-curseforge' command: Access to https://api.curseforge.com is forbidden or rate-limit has been exceeded. Ensure CF_API_KEY is set to a valid API key from https://console.curseforge.com/ or allow rate-limit to reset

@itzg
Copy link
Owner

itzg commented Jan 28, 2025

It is CurseForge imposing the rate limit. You could contact them, but I'm guessing they won't change it.

@der-eismann
Copy link

Sorry, not really issue-related, just a small hint for anyone as dumb as me: I spent about an hour trying and debugging this because I always got the error above, but the API token I had worked just fine with curl, so it couldn't have been the rate limit.
Turns out I was too confident and forgot to read and/or click everything in the docs. I got my API token from https://legacy.curseforge.com/account/api-tokens and tested it with the APIs listed here, which worked great. Yes the format is different and has no dollar signs, but I didn't figure out that the format should be the same.
Only now I saw that https://console.curseforge.com/ is actually something different and labelled "CurseForge for studios" (which doesn't really make sense from a user perspective here, we're not studios). Maybe this helps someone.

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

5 participants