FabricMC / fabric-example-mod

Example Fabric mod
Creative Commons Zero v1.0 Universal
1.67k stars 942 forks source link

Using fabric-example-mod with shadowJar crashes when trying to run mod. #189

Closed NebulaBC closed 2 years ago

NebulaBC commented 2 years ago

I have upgraded some of my mods to 1.19 already, and it worked smoothly, but now with the latest version of fabric-example-mod, trying to make a mod I get the crash below. I can run runClient just fine, and it loads with my mod perfectly, but when I try to run it with a real fabric client (latest versions and all) I get this error.

[12:43:06] [main/ERROR]: Error loading companion plugin class [net.fabricmc.fabric.impl.client.indigo.IndigoMixinConfigPlugin] for mixin config [fabric-renderer-indigo.mixins.json]. The plugin may be out of date: ClassCastException:class net.fabricmc.fabric.impl.client.indigo.IndigoMixinConfigPlugin cannot be cast to class org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin (net.fabricmc.fabric.impl.client.indigo.IndigoMixinConfigPlugin is in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @50f8360d; org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin is in unnamed module of loader 'app')
java.lang.ClassCastException: class net.fabricmc.fabric.impl.client.indigo.IndigoMixinConfigPlugin cannot be cast to class org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin (net.fabricmc.fabric.impl.client.indigo.IndigoMixinConfigPlugin is in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @50f8360d; org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin is in unnamed module of loader 'app')
    at org.spongepowered.asm.mixin.transformer.PluginHandle.<init>(PluginHandle.java:97) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinConfig.onSelect(MixinConfig.java:708) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.selectConfigs(MixinProcessor.java:498) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:460) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) [sponge-mixin-0.11.4+mixin.0.8.5.jar:0.11.4+mixin.0.8.5]
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:413) [fabric-loader-0.14.7.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:322) [fabric-loader-0.14.7.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) [fabric-loader-0.14.7.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) [fabric-loader-0.14.7.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) [?:?]
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:454) [fabric-loader-0.14.7.jar:?]
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.7.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.14.7.jar:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
    at org.multimc.impl.OneSixLauncher.invokeMain(OneSixLauncher.java:104) [NewLaunch.jar:?]
    at org.multimc.impl.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:175) [NewLaunch.jar:?]
    at org.multimc.impl.OneSixLauncher.launch(OneSixLauncher.java:185) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.listen(EntryPoint.java:127) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.main(EntryPoint.java:57) [NewLaunch.jar:?]

I have not been able to find anyone else having this issue, but I am not sure what I could be doing wrong because I have tried with the exact example mod and only shadowJar added. I don't see how this could be a mistake on my part, but also I have tried moving fabric api and fabric loader back a version and get the same error. Could just be an issue with shadow?

modmuss50 commented 2 years ago

👋 We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for either a discussion thread, or a message on our discord server. Please post your request on one of these, and the conversation can continue there.