Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: duplicate fabric loader for cloth-config v6.1.48 #251

Open
kaz-mighty opened this issue Apr 24, 2024 · 1 comment
Open

Error: duplicate fabric loader for cloth-config v6.1.48 #251

kaz-mighty opened this issue Apr 24, 2024 · 1 comment

Comments

@kaz-mighty
Copy link

minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.15.10

#Fabric api
fabric_version=0.58.0+1.19

(Also occurs in 1.19.2)

  • cloth-config version 8.3.115
  • loom version 1.6-SNAPSHOT

If you specify the dependencies as per the wiki, the following error will occur when running Minecraft Client in IntelliJ IDEA.

Exception in thread "main" java.lang.ExceptionInInitializerError
	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.IllegalStateException: duplicate fabric loader classes found on classpath: jar:file:/C:/Users/kazuki/.gradle/caches/modules-2/files-2.1/net.fabricmc/fabric-loader/0.15.10/3538922fb4094a9d600d528e7acccac662b8a3c2/fabric-loader-0.15.10.jar!/net/fabricmc/loader/api/FabricLoader.class, jar:file:/D:/Users/kazuki/Minecraft_dev/MoreTooltips/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_19_1_19_build_4_v2/net/fabricmc/fabric-loader/0.14.8/fabric-loader-0.14.8.jar!/net/fabricmc/loader/api/FabricLoader.class
	at net.fabricmc.loader.impl.util.LoaderUtil.verifyClasspath(LoaderUtil.java:65)
	at net.fabricmc.loader.impl.launch.knot.Knot.<clinit>(Knot.java:347)
	... 2 more

This doesn't seem to happen if I set the dependencies as below:

    modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
        exclude(group: "net.fabricmc.fabric-api")
        exclude(group: "net.fabricmc", module: "fabric-loader")
    }

Or change modApi to modImplementation.

This did not happen with 1.18.1 + cloth-config v6.1.48 and 1.19.4 + 10.1.117.

@kaz-mighty kaz-mighty changed the title Error: duplicate fabric loader Error: duplicate fabric loader for cloth-config v6.1.48 Apr 24, 2024
@Jab125
Copy link

Jab125 commented Apr 24, 2024

Not really a bug, more of how Gradle resolves dependencies.

If you see an error like trying to load net.fabricmc.loader.impl.FabricLoaderImpl from target class loader, it means you have two copies of Fabric Loader on your runtime classpath. Try adding { exclude group: 'net.fabricmc', module: 'fabric-loader' } after the affecting dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants