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

Cannot publish a modpack to CurseForge #69

Closed
Kir-Antipov opened this issue May 30, 2023 Discussed in #68 · 2 comments
Closed

Cannot publish a modpack to CurseForge #69

Kir-Antipov opened this issue May 30, 2023 Discussed in #68 · 2 comments

Comments

@Kir-Antipov
Copy link
Owner

Discussed in #68

Originally posted by Encode42 May 30, 2023
I'm trying to publish a mod pack to CurseForge, which does not have any files that values can be inferred from (fabric.mod.json, etc.) As such, I'm providing the game-versions field myself. This works as expected when publishing to Modrinth, however, the same is not true for CurseForge.

When the action runs, the following error appears:

Error: HttpError: 400 (Bad Request, {"errorCode":1002,"errorMessage":"Error in field `metadata`:\n* Array item count 0 is less than minimum count of 1. Path \u0027gameVersions\u0027, line 1, position 381."})

Failing run

Is this user error? Am I misunderstanding how this field works?

@Kir-Antipov
Copy link
Owner Author

Kir-Antipov commented May 30, 2023

@encode42, the error message from CurseForge suggests that the gameVersions field is empty. This isn't a user error, but rather a consequence of the internal rotation of different game version ID variants. This rotation was implemented to cope with inconsistencies in CurseForge's API (refer to issue #42).

For your configuration:

loaders: |
  fabric
game-versions: |
  1.19.2

mc-publish generates the following ID variants:

[
  // 1.19.2 (mods + mod packs), fabric
  [ 9366, 7499 ],

  // 1.19.2 (plugins)
  [ 9560 ],

  // 1.19.2 (addons)
  [ 9551 ],
]

The rotation among these variants is activated when CurseForge returns error code 1009 ("Invalid game version ID: <ID> belongs to an invalid dependency"). If none of these IDs are accepted by CurseForge, mc-publish will attempt to omit gameVersions entirely, which seems to be the situation in this case. Unfortunately, there's nothing more that can be done if this occurs. This mechanism is functioning as designed. The key question to answer is why CurseForge does not accept the first entry. It works for mods, so it should have also worked for mod packs.

@Kir-Antipov
Copy link
Owner Author

Kir-Antipov commented May 30, 2023

Hmmmm.

Warning: W.I.P. CurseForge rejected these game versions: [9366,7499]. HttpError: 400 (Bad Request, {"errorCode":1009,"errorMessage":"Invalid game version ID: 7499 belongs to an invalid dependency."})

7499 is Fabric:

{
  "id": 7499,
  "gameVersionTypeID": 68441,
  "name": "Fabric",
  "slug": "fabric"
}

What the heck is going on here? CurseForge supports specifying loaders for modpacks in their web interface. Why doesn't it via API?

Kir-Antipov added a commit that referenced this issue May 30, 2023
Minecraftschurli pushed a commit to Minecraftschurli/mc-publish that referenced this issue Oct 18, 2023
Minecraftschurli pushed a commit to Minecraftschurli/mc-publish that referenced this issue Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant