matthewprenger / CurseGradle

Gradle plugin to upload Minecraft mods to CurseForge
MIT License
1 stars 1 forks source link

Error when attempting to push MC 1.12 mod to Curse #10

Closed DuelMonster closed 7 years ago

DuelMonster commented 7 years ago

I'm getting the following error: Error Code 1009: Invalid game version ID: 6588 belongs to an invalid dependency.

Looking at the Curse API there appear to be two entries of 1.12:

    {
        "id": 6580,
        "gameVersionTypeID": 628,
        "name": "1.12",
        "slug": "1-12"
    },
    {
        "id": 6588,
        "gameVersionTypeID": 1,
        "name": "1.12",
        "slug": "1-12"
    }

Any ideas on how to get this to push?

curseforge {
    apiKey = ''
    project {
        id = ''
        changelogType = 'markdown'
        changelog = file('Change_v2.x.md')
        releaseType = 'release'
        addGameVersion 1.12
        mainArtifact jar
        addArtifact srcJar
        addArtifact deobfJar
    }
}

Thanks

Darkhax commented 7 years ago

You're definitely not alone with this issue. Weirdly enough, this was working initially, I think Curse may have changed it up a bit.

marvin-roesch commented 7 years ago

This issue is due to the Curse API returning two versions of 1.12. One is for Bukkit, the other one for mods (See this API result for reference). It appears to me like Bukkit versions always have a gameVersionTypeID of 1, so adding a check for that should suffice. I would PR this fix, but need some verification whether this is the right way to go.

Darkhax commented 7 years ago

Looking at the results, it seems like this may be an error on Curse's end. Unless I missed it, 1.12 is the only version which has two entries. It may be best to poke one of the curse support and ask them about it.

marvin-roesch commented 7 years ago

I don't know the Bukkit ecosystem, but maybe something has changed there? Previous versions always referenced a particular CraftBukkit version, so I can only assume that they have gone to a more normal alternative. I'm assuming that if a project was to use any other of the gameVersionTypeID: 1 versions, the plugin would also fail, so better safeguard against this completely.

Darkhax commented 7 years ago

Is this plugin specifically for forge mods? If so, then safeguarding regardless would be a good idea.

DuelMonster commented 7 years ago

Glad I'm not going mad... my gradle/groovy skills are very basic and I'm happy to hear it's not something I'm doing. I do agree that it looks as though bukkit mods seem to be using GameVersionTypeID: 1 I all for a safeguarded version...

marvin-roesch commented 7 years ago

The plugin is hardcoded to push to minecraft.curseforge.com which makes me assume it's exclusive to Forge mods. Additionally, you can't select the Bukkit versions when creating a file manually, either. As a matter of fact, however, reporting this to the CF devs either way seems appropriate, since the Bukkit site also lists "normal" Minecraft versions alongside the "Bukkit" ones. There's not a single project listed under these versions, so I guess you can't upload projects for them, either.

DuelMonster commented 7 years ago

Agreed. Both sites seem to be reading the same API as the versions list are identical. they should probably split the two version lists...

matthewprenger commented 7 years ago

So according to Curse's API docs here, you can issue a GET to https://minecraft.curseforge.com/api/game/dependencies and get a list of Game -> gameVersionTypeID mappings. But that URL keeps giving me a An unhandled exception occurred while processing the request. error. I'll have to talk to Curse people to get to the bottom of this.

matthewprenger commented 7 years ago

Talked with Zeldo. He submitted an internal ticket to get the /api/game/dependencies endpoint fixed. Once that's done, ill have to update CurseGradle to use that.

DuelMonster commented 7 years ago

Ah, well that would make sense. I'm surprised that they aren't using it themselves to populate the site version lists... Fingers crossed that they sort it relatively soon.

Adubbz commented 7 years ago

Any update on this from Zeldo? Would suck if Curse just lets the ticket sit there since this is a pretty big deal...

matthewprenger commented 7 years ago

Nothing yet, just tested again and the API is still broken. Hopefully I'll hear something tomorrow.

matthewprenger commented 7 years ago

1.0.9 is live: https://plugins.gradle.org/plugin/com.matthewprenger.cursegradle

Darkhax commented 7 years ago

Thank you!

DuelMonster commented 7 years ago

Excellent. Thank you very much!