Forge Config API Port

Forge Config API Port

37M Downloads

[Bug]: Startup crash by incorrect config file path with dependent mods

spyr0k4t opened this issue ยท 3 comments

commented

Mod Loader (Required)

Fabric

Minecraft Version(s) (Required)

1.21.1

Mod Version(s) (Required)

21.1.3

Minimal Setup (Required)

Yes

Notes (Required)

Hi.

It looks like the following mods: regions unexplored, cobblemonintegrations, sophisticatedcore/backpacks/storage, and easy anvils/magic are unable to create their config files and assumes there is an extra file in its directory. The server crashes during config file writing due to a malformed config path being resolved as .\config.\config<modname>.toml.

I tried to follow other issues here by manually creating its respective directories but it didn't work. I also attached my modlist. I also tried to remove mods that are client-side only from the server folder thought I'm not sure if all are taken out accordingly... Any advice is greatly appreciated!!

modlist.txt

latest.log (Required)

https://gist.github.com/spyr0k4t/97236dfadc43cec936d51284d7400528

commented

The issue is this:

	- corgilib 5.0.0.4
	   |-- com_electronwill_night-config_core 3.8.2
	   \-- com_electronwill_night-config_toml 3.8.2

CorgiLib ships a broken version of the Night Config library which FCAP uses. Since the version is newer than the one FCAP includes it is preferred by Fabric.

commented

I've pushed an update for FCAP that implements a workaround for Night Config.
This is not ideal and the issue really must be fixed upstream in Night Config itself.
But for the time being while other mods may provide the broken version this seems like a valid approach.

commented

Hey, @Fuzss i had the same issues on two another Mods

DashieDev/DoggyTalentsNext#150

and

https://modrinth.com/mod/accessdenied

[21:22:47] [main/ERROR]: Failed to start the minecraft server
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'accessdenied' at 'fox.mods.accessdenied.AccessDenied'!
	at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:403) ~[fabric-loader-0.16.14.jar:?]
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.16.14.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:401) ~[fabric-loader-0.16.14.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.16.14.jar:?]
	at knot/net.minecraft.server.Main.main(Main.java:111) [server-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.16.14.jar:?]
	at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.16.14.jar:?]
	at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [fabric.jar:1.1.0]
Caused by: com.electronwill.nightconfig.core.io.WritingException: Failed to write (REPLACE_ATOMIC) the config to: ./config/foxmods/client/accessdenied.toml
	at knot/com.electronwill.nightconfig.core.io.ConfigWriter.write(ConfigWriter.java:98) ~[com_electronwill_night-config_core-3.8.2-8003ac503a67602d.jar:?]
	at knot/com.electronwill.nightconfig.core.io.ConfigWriter.write(ConfigWriter.java:77) ~[com_electronwill_night-config_core-3.8.2-8003ac503a67602d.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.writeConfig(ConfigTracker.java:303) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.setupConfigFile(ConfigTracker.java:288) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.loadConfig(ConfigTracker.java:203) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.openConfig(ConfigTracker.java:165) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.registerConfig(ConfigTracker.java:96) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/fuzs.forgeconfigapiport.fabric.impl.core.NeoForgeConfigRegistryImpl.register(NeoForgeConfigRegistryImpl.java:17) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/fox.mods.accessdenied.AccessDenied.onInitialize(AccessDenied.java:20) ~[accessdenied-fabric-1.21.X-4.0.1.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.14.jar:?]
	... 7 more
Caused by: java.nio.file.NoSuchFileException: ./config/foxmods/client/./config/foxmods/client/accessdenied.new.tmp.toml
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:261) ~[?:?]
	at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:482) ~[?:?]
	at java.base/java.nio.file.Files.newOutputStream(Files.java:228) ~[?:?]
	at knot/com.electronwill.nightconfig.core.io.ConfigWriter.write(ConfigWriter.java:92) ~[com_electronwill_night-config_core-3.8.2-8003ac503a67602d.jar:?]
	at knot/com.electronwill.nightconfig.core.io.ConfigWriter.write(ConfigWriter.java:77) ~[com_electronwill_night-config_core-3.8.2-8003ac503a67602d.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.writeConfig(ConfigTracker.java:303) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.setupConfigFile(ConfigTracker.java:288) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.loadConfig(ConfigTracker.java:203) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.openConfig(ConfigTracker.java:165) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/net.neoforged.fml.config.ConfigTracker.registerConfig(ConfigTracker.java:96) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/fuzs.forgeconfigapiport.fabric.impl.core.NeoForgeConfigRegistryImpl.register(NeoForgeConfigRegistryImpl.java:17) ~[ForgeConfigAPIPort-v21.1.3-1.21.1-Fabric.jar:?]
	at knot/fox.mods.accessdenied.AccessDenied.onInitialize(AccessDenied.java:20) ~[accessdenied-fabric-1.21.X-4.0.1.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399) ~[fabric-loader-0.16.14.jar:?]
	... 7 more