ThatOrThis icon indicating copy to clipboard operation
ThatOrThis copied to clipboard

Fabric Loader v0.12.x compatibility

Open marcohoovy opened this issue 3 years ago • 11 comments

when starting the mod it will give this error:

Exception in thread "main" java.lang.NoClassDefFoundError: net/fabricmc/loader/discovery/ModResolutionException at io.github.ezforever.thatorthis.Main.run(Main.java:33) at io.github.ezforever.thatorthis.PreloadAdapter.<clinit>(PreloadAdapter.java:14) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:466)

marcohoovy avatar Sep 12 '21 13:09 marcohoovy

Ooh the inevitable has come...

Please attach the full debug log, or if the log is not available, please report your game and Fabric Loader's version.

EZForever avatar Sep 12 '21 16:09 EZForever

build.gradle gradle.properties debug.log

Exception in thread "main" java.lang.NoClassDefFoundError: net/fabricmc/loader/discovery/ModResolutionException
	at io.github.ezforever.thatorthis.Main.run(Main.java:33)
	at io.github.ezforever.thatorthis.PreloadAdapter.<clinit>(PreloadAdapter.java:14)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:466)
	at net.fabricmc.loader.impl.FabricLoaderImpl.setupLanguageAdapters(FabricLoaderImpl.java:411)
	at net.fabricmc.loader.impl.FabricLoaderImpl.finishModLoading(FabricLoaderImpl.java:307)
	at net.fabricmc.loader.impl.FabricLoaderImpl.freeze(FabricLoaderImpl.java:112)
	at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:120)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: java.lang.ClassNotFoundException: net.fabricmc.loader.discovery.ModResolutionException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:158)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
	... 11 more

encountered this problem on my client before, now, after downgrading to 0.11.7 the error changed to

Exception in thread "main" java.lang.IllegalArgumentException: URI scheme is not "file"
	at java.base/java.io.File.<init>(File.java:423)
	at net.fabricmc.loader.util.UrlUtil.asFile(UrlUtil.java:54)
	at net.fabricmc.loader.discovery.ClasspathModCandidateFinder.lambda$findCandidates$0(ClasspathModCandidateFinder.java:106)
	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1694)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
	at net.fabricmc.loader.discovery.ClasspathModCandidateFinder.findCandidates(ClasspathModCandidateFinder.java:102)
	at net.fabricmc.loader.discovery.ModResolver.resolve(ModResolver.java:733)
	at io.github.ezforever.thatorthis.FabricInternals.injectMods(FabricInternals.java:208)
	at io.github.ezforever.thatorthis.FabricInternals.onHook(FabricInternals.java:161)
	at io.github.ezforever.thatorthis.FabricInternals$HookedModContainerList.invoke(FabricInternals.java:41)
	at jdk.proxy2/jdk.proxy2.$Proxy18.iterator(Unknown Source)
	at net.fabricmc.loader.FabricLoader.setupMods(FabricLoader.java:411)
	at net.fabricmc.loader.FabricLoader.finishModLoading(FabricLoader.java:263)
	at net.fabricmc.loader.FabricLoader.freeze(FabricLoader.java:107)
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:127)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

debug.log

lenrik1589 avatar Oct 17 '21 16:10 lenrik1589

Fabric Loader v0.12.x basically rewrote the mod loading mechanics, thus completely broke ThatOrThis. The only solution is to rewrite ThatOrThis as well, and it's planned as v0.3.0 (see #6), but personally I don't really have enough time to keep working on this, so no release date is promised.

As for @lenrik1589's problem with v0.11.7 in a development envionment, it's a design oversight and I'm working on a fix.

EZForever avatar Oct 20 '21 03:10 EZForever

@lenrik1589, try this snapshot: [email protected]. Use with Fabric Loader v0.11.7. You might need to temporarily configure your Gradle to use this local jar instead of grabbing from Modrinth.

I'll change mod manifest to warn users about v0.12.x incompatibility after fixing v0.11.x issue. As for the actual fix, I'm looking for some help.

EZForever avatar Oct 20 '21 04:10 EZForever

try this snapshot: [email protected]

yes, this version worked like a charm

lenrik1589 avatar Oct 20 '21 11:10 lenrik1589

OK that's nice to know. v0.2.6 is out containing the fix, you can use Modrinth Maven again.

EZForever avatar Oct 20 '21 16:10 EZForever

I'm not gonna lie here, but I completely forgot about this so sorry for the late response!

my issue was caused by an version mismatch, similar to the discussion above

marcohoovy avatar Oct 22 '21 01:10 marcohoovy

Using the dev version still doesn't work image

JustSimplyKyle avatar Nov 14 '21 07:11 JustSimplyKyle

THis is my config https://www.toptal.com/developers/hastebin/xiwuwufilu.json

JustSimplyKyle avatar Nov 14 '21 07:11 JustSimplyKyle

@EZForever , hi! I'm sorry to write here, but I don't know a more suitable place for such messages. I know it's been a long time since the first incompatible version of Fabric Loader was released, but I want to say that your amazing mod is still relevant, and it lacks support so much for new Fabric versions. Therefore, I would like to ask if there are any solutions to eliminate incompatibility for now, or can ThatOrThis be considered dead?

Felix14-v2 avatar Feb 28 '22 22:02 Felix14-v2

@Felix14-v2 , thanks for your support, and I can say ThatOrThis is definitively not dead. I've been missing on this project (or rather, missing on GitHub) was due to some personal things that hit me in the last few months. I will continue developing this mod and try my best to iron out all the issues and incompatibilities, though again, no guarantee is given.

As for the issue mentioned above by KyleUltimate , honestly I don't know what had happened. I don't really have any experience of dealing with java modules, the current code is a "throw-things-in-and-hope-it-will-work" approach - well now we know it doesn't work. It launches under development environment, at least.

EZForever avatar Mar 01 '22 04:03 EZForever