mindstorm38 / portablemc

A fast, reliable and cross-platform command-line Minecraft launcher and API for developers. Including fast and easy installation of common mod loaders such as Fabric, Forge, NeoForge and Quilt.
https://pypi.org/project/portablemc/
GNU General Public License v3.0
320 stars 19 forks source link

PortableMC failing to install forge #208

Closed marewey closed 3 months ago

marewey commented 3 months ago

When I attempt to run 'start -u test forge:1.19.2-43.3.0' or any version of forge, without it already being installed, I get this error:

[ OK ] Resolved forge 1.19.2-43.3.5, downloading installer and parent version. [ OK ] Downloaded 1/1 files, 7.0MB in 0.3s (no error). [FAILED] Invalid command to start forge installer wrapper (should not happen, contact maintainers, this can also happen if the installer fails).

b'info: using install runner V2InstallRunner\r\ninfo: install runner validated main directory\r\nException in thread "main" java.lang.NoSuchMethodError: \'boolean net.minecraftforge.installer.actions.ClientInstall.run(java.io.File, java.util.function.Predicate, java.io.File)\'\r\n\tat portablemc.wrapper.V2InstallRunner.install(V2InstallRunner.java:42)\r\n\tat portablemc.wrapper.Main.main(Main.java:38)\r\n'

On my previous installs it still works, only on new installs it fails. I have checked for updates on pip, portablemc, portablemc-forge, It is able to download and install and run vanilla and fabric. I also noticed that it give me error when I do forge:1.19.2-latest:

[FAILED] Invalid JSON response from GET https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json, status: 403, data: b'<!DOCTYPE html>\n\n<!-

mindstorm38 commented 3 months ago

Hi! It seems like you are using an outdated version of PMC. The add-on portablemc-forge is no longer needed and should be uninstalled before trying to update portablemc (because the add-on locks de required version).

marewey commented 3 months ago

Mark as resolved, updating to newest version seems to have fixed the issue. I didn't realize that --force-reinstall was needed to actually get it to delete the old one and install the new one. Thanks