gorilla-devs / ferium

Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when attempting to run `ferium list -v`

PurPur134 opened this issue · comments

Description

If you have a profile that contains a mod that was added via Modrinth and has a license that links to a different website, such as Github, as opposed to most other mods, whose licenses are embedded within Modrinth, and then try to run ferium list -v, it throws an error:

error decoding response body: invalid type: null, expected a string representing a URL at line 1 column x,

where x is some seemingly random number each time the command is run. An example of this is when using the mod Entity Culling, whose owner has issued a custom license they have created themselves and use for almost all of their other mods.

Steps to reproduce

  1. Make sure you have created a profile
  2. Add a mod from Modrinth that has a "unique" license that links to a different page, such as Entity Culling
  3. Run ferium list -v
  4. Expected verbose information about the mod, instead got error

Operating System

Windows

Are you using the latest version of ferium?

  • I am using the latest version of ferium

Additional Information

No response

Appears to be fixed now; the verbose list now shows and the license for the mod is shown as "Custom" with the link to it in parentheses. I didn't update it or anything or install a new build, and I couldn't find any commits to the repo since the creation of this issue that would have affected this. I also found that a much more popular mod, Sodium, also has its own custom license.

However, I did notice that mods added via CurseForge project IDs did not have a line for their license, let alone the license itself, regardless of whether or not it was custom (all licenses appear to be embedded within the site), so perhaps there should be an issue opened for adding that functionality.

Appears to be fixed now

Hmm I do remember looking into this issue and confirming that it was a bug. I quite don't remember what the issue was though The problem was the field with the link for custom licences didn't exist.

shown as "Custom" with the link to it in parentheses

That is exactly the intended behaviour, it's how I programmed it to show up.

I also found that a much more popular mod, Sodium, also has its own custom license.

They previously had a FOSS licence, but the developers' work was exploited by some people, who reuploading the mod without permission and monetised it. They relicensed the project recently, you can read more about it at CaffeineMC/sodium-fabric#2400.

mods added via CurseForge project IDs did not have a line for their license

I have no idea how the website does it, but the third-party API exposed to us does not have any licence information.

Why did it just suddenly start working as intended again though? As I said, I didn't install a new version or build of ferium. Did one of the repos it relies on, like libium or furse, or the Modrinth API update?

I'm pretty sure there was a change on the server side. I actually checked modrinth/labrinth for any recent relevant changes but didn't find any, so I believe it's something related to their internal database itself. I can ask the team if you're interested in finding out.

Sure, go ahead. I'd really like to know the root of this problem, so thanks!