RandomPatches (Forge)

RandomPatches (Forge)

56M Downloads

Config overwritten on each server reboot

ClaudiusMinimus opened this issue ยท 15 comments

commented

I have set "keep_alive_packet_interval_seconds = 30" in the server/config/randompatches.toml, but it keeps resetting to "keep_alive_packet_interval_seconds = 15" on each reboot as shown in the screenshot below.

Minecraft: 1.16.4
Forge: 35.1.28
RandomPatches: 2.1.0

randompatches

commented

Ugh, I thought this would have been fixed by the new configuration library.
By the way, I'd recommend leaving it on 15 unless you have a good reason to otherwise.

commented

Can you send me a log for when the server starts up?
EDIT: I wonder if TheElectronWill/night-config#67 has something to do with this.

commented

I think I've figured it out: NightConfig doesn't like UTF-8 with BOM with LF line endings. This will be fixed in the next update; let me know if it works. ๐Ÿ˜„

commented

Hey! Just tested latest release and the issue still persists on my fabric server:/ here's my latest.log, just in case its usefull for you! https://pastebin.com/fFMpjw98

commented

Damn, can you try modifying the config, uploading it to the server, downloading it again and then sending the config file to me without launching the server? I just want to check the encoding and line endings.

commented

Hi, this happens in fabric latest randompatches version too, though difference is it deletes everything but two lines of text: "RandomPatches configuration.
All configuration options not under [client] are server-sided unless otherwise stated."

So it is required to replace server config file every restart to sync with client config correctly

commented

Okay...I tried something : I deleted the config file to see if the server would generate it correctly after restart and it did . Config file was all correct and complete after I let it regerenate itself after one restart. But then I restarted again and it messed up and only showed those two lines I mentioned on my previous comment (all of this has nothing to do with the file above)

commented

Yes, sure. Here it is:
randompatches.zip

commented

Can you try this debug version I've just built? Send me the resulting log and the numerous files it creates in the server directory.
randompatches-2.1.4-fabric.jar.zip

commented

Sure. Here they are:
latestlog+configfile.zip

commented

I'm genuinely stumped. Can you confirm that this doesn't occur on the client and that this occurs even when no other mod is installed on the server?

commented

Okay I deleted every mod but Fabric API and suddenly it was working well. No overrides nor anything happening. But the issue doesnt happen at all on the client, thats another thing...so its a server side mod, Im guessing? any idea which one?:/

Edit: Nevermind. I tried randompatches 2.1.3 without mods and the issue persisted. I didnt realize because it happens when I make changes to the config file. With version 2.1.3 it deletes the whole file, but with version 2.1.4 it only deletes what I edited, leaving the default value. Here are some files I forgot to add:
debugfiles.zip

commented

I believe I've figured out the issue. Because NightConfig doesn't support top-level configuration comments, I've been manually adding them after the configuration flie is saved (this seems to be the easiest way to do this). However, it turns out that the save operation is asynchronous by default (I'm not sure why this problem was only occurring server-side and only for certain people), so my configuration library wrapper wrapper (๐Ÿ˜›) thinks the save operation has completed before it actually has, and tries to add the top-level configuration comments to an empty string. Thank you @shouxd for helping with this one! ๐Ÿ˜„
Anyway, let me know if the next update fixes this.

commented

I've been testing a while reseting the server and it works wonders now for me. Thank you a lot for your patience and quick acting!:)

commented

You're welcome, and thanks for letting me know!