Skidamek / AutoModpack

Enjoy a seamless modpack installation process and effortless updates with a user-friendly solution that simplifies management, making your gaming experience a breeze.
https://modrinth.com/mod/automodpack
GNU Lesser General Public License v3.0
106 stars 30 forks source link

Client startup crash when using certain combinations of local and modpack mods #255

Open n-zer opened 1 month ago

n-zer commented 1 month ago

Bug description

Certain combinations of mods in the server modpack and the client's local mods folder may cause the client to crash on startup.

One such combination is PassthroughSigns (and dependencies) in the server's modpack, and Charmonium (and dependencies) in the client's local mods folder.

There is no crash when both mods are in the server's modpack or when both mods are in the client's mods folder. I suspect the crash has to do with the mods sharing a dependency (Fabric API) and the way AutoModpack handles duplicate mods in the modpack and the local mods folder.

Steps to reproduce

  1. Create a fresh server instance.
  2. Add AutoModpack, PassthroughSigns, Forge Config API Port, and Fabric API to the server's modpack folder
  3. Start the server
  4. Create a fresh client instance with Fabric 0.16.0
  5. Add AutoModpack, Charmonium, and Fabric API to the client's mods folder
  6. Start the client and connect to the server

Expected behavior

After downloading the server's modpack and restarting, the client works as expected

Actual behavior

After downloading the server's modpack and attempting to restart, the client will crash on startup.

Note that the client will continue to crash on startup if AutoModpack is removed; Fabric API must be redownloaded to resolve the crashing.

Relevant logs

https://mclo.gs/RsUNJ7v

Minecraft & Mod Loader versions

1.21 fabric 0.16.0

Minecraft launcher

No response

Operating system

Windows 10

AutoModpack version

4.0.0-beta11

Other information

No response

Check list

Skidamek commented 1 month ago

Hey, could you try with fabric loader 0.15.11?

n-zer commented 1 month ago

Sorry for the late reply, I've been kind of busy the last few days. But yeah, I can try with 0.15.11 tomorrow and see what happens

Skidamek commented 3 weeks ago

After a little digging i see that its because Charmonium provides outdated night-config packages specifically version 3.6.6 but forgeconfigapiport depends on the same night-config packages but with version 3.8.0 and because Charmonium is in default mods dir, older packages are loaded first, and then for some reason they are not getting replaced by the new ones. (automodpack should somehow handle that)

So when PassthroughSigns is getting initialized it calls forgeconfigapiport which then calls methods from night-config which doesn't even exist yet in the older version which causes game to crash. For the time being easiest solution is to recompile Charmonium for it to provide newer version of night-config to fix the crash. I've created pull request to do that and also since it has MIT license I've uploaded compiled one to my proton drive

SirOaken commented 2 weeks ago

This is also an issue on Forge 1.20.1

DuskCrow19 commented 1 week ago

Hello, so for the last few days, i got an issue, that looks like that has been a recurring problem "how automodpack loads certain mods", i have a server where ive been tweaking with several mods, like a lot, but in the last batch i installed the sinytra connector mod crashes, i first thought it was the connector bug, and i went to their github but couldn't find a fix, so i made two instances of the client side, one with the automodpack and one without it, well without the automodpack the game ran smoothly, but with the automodpack same error "Connector Error no existing paths: [ Forge 1.20.1.jar]", using forge 47.3.0, minecraft 1.20.1 and automodpack AutoModpack 4.0.0-beta14 forge, it the worst cases the mods working sinytra are merely client side and visual enhancements, i think (i haven't tested it) i saw that you can disable automodpack on client so you can join the server (obviously having the same matching mods) but only on fabric?, thats the only way i can think to at least fix this kinda bug, i ve read that is kinda more complicated on forge for the way it is coded

Skidamek commented 1 week ago

Huh connector error? That's seems different, could you @DuskCrow19 create a new issue and provide a log please?

i saw that you can disable automodpack on client so you can join the server (obviously having the same matching mods) but only on fabric?

Sorry that's completely wrong, thanks for bringing it to my attention, updated wiki, it should work perfectly fine also on forge.

abuyazid955 commented 3 days ago

hello, i have the same issues, when i put my mods on the mods folder as a client, the launcher crashed

im using the latest beta version 1.21.1 for fabric

image