RandomPatches (Forge)

RandomPatches (Forge)

56M Downloads

Config lost

Naheulf opened this issue ยท 17 comments

commented

Description of the Issue

randompatches.toml lost it's content/config

Steps to Reproduce the Issue

Exact steps unknown.
Mix of server reboot and download file from FTP (my server is on a GSP)

Expected Behavior

Configs should stay in the randompatches.toml file

Actual Behavior

Config is lost.

Debug Information

Randompatches 1.15.2-1.21.1.4 (Confirmed in this version but already seen with 1.21.1.2)

commented

Speaking of the config file, can you specify in the comments of this one the unit of timeouts? ticks? milli-second ? plain-seconds ?

commented

Yeah, I could do that.
EDIT: Done.

commented

Sorry for the delayed response, but have you ensured the encoding of the configuration file is UTF-8? If not, can you let me know what it is?
EDIT: The newest version should now print an error when the configuration is reset.

commented

I'm currently rewriting RandomPatches for 1.16.4, so this should be fixed as well. ๐Ÿ˜„

commented

This should be fixed in the rewrite for 1.16.4 (not out yet).

commented

@Viatos Can I have a log?

commented

Hi - I'm still having this issue with the latest version of RandomPatches, and I checked - the encoding is UTF-8. For some reason it regens the config as soon as I start Minecraft.

commented

This is still an issue in 1.16.3 - our config keeps getting wiped and because the mods are so non-optimized we need the login timeouts extended to be able to log in to the server for those with slower pcs.

This keeps happening on our dedicated server.
randompatches-1.16.2-1.22.1.2

Here are the contents of the config-

`

RandomPatches configuration`

Nothing else is in the file.

commented

Our workaround for this is to have our start script copy the config file back in to the folder each reboot.

commented

Strange. Is there a stack trace in the console anywhere? It should have been printed when the configuration was reset.

commented

I can confirm the same happening with AllTheMods 6 modpack. forge-1.16.4-35.0.18. This is all over the console:

[21Nov2020 14:57:24.231] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: com.electronwill.nightconfig.core.io.ParsingException: Invalid character 's' after key [ment]
[21Nov2020 14:57:24.252] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.toml.TableParser.parseDottedKey(TableParser.java:152)
[21Nov2020 14:57:24.252] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:55)
[21Nov2020 14:57:24.253] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44)
[21Nov2020 14:57:24.253] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37)
[21Nov2020 14:57:24.253] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113)
[21Nov2020 14:57:24.253] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219)
[21Nov2020 14:57:24.286] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202)
[21Nov2020 14:57:24.286] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.core.file.WriteAsyncFileConfig.load(WriteAsyncFileConfig.java:138)
[21Nov2020 14:57:24.287] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.electronwill.nightconfig.core.file.SimpleCommentedFileConfig.load(SimpleCommentedFileConfig.java:38)
[21Nov2020 14:57:24.287] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager.reloadFromDisk(ConfigManager.java:77)
[21Nov2020 14:57:24.287] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager.register(ConfigManager.java:70)
[21Nov2020 14:57:24.288] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at com.therandomlabs.randompatches.RandomPatches.<init>(RandomPatches.java:23)
[21Nov2020 14:57:24.288] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[21Nov2020 14:57:24.288] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[21Nov2020 14:57:24.288] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.lang.Class.newInstance(Class.java:442)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:81)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1632)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
[21Nov2020 14:57:24.289] [modloading-worker-1/INFO] [STDERR/]: [com.therandomlabs.randompatches.repackage.com.therandomlabs.utils.config.ConfigManager:reloadFromDisk:79]: 	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)

Frankly, there is no key [ment] anywhere in the config. This issue happens by simply editing the default config and changing:

loginTimeout = 900

with:

loginTimeout = 9000

Then restarting the server more than once.

commented

@ProsperCraft @Naheulf do you use Akliz to host your server? Somehow, it seems to only happen when our server is there.

commented

Nop. But since I don't have time to play I don't know If it's fixed now ... or not.

commented

No, this server was hosted on our own Centos Linux box.

commented

It's been a while cos of exams, but has anyone tried checking the encoding of the configuration file?

commented

We started reliably experiencing this issue again on our Akliz server. Every 2nd restart the config is trimmed to:

# RandomPatches configuration

The encoding is UTF-8 with LF line endings on all configs I've ever used.

commented

Thanks for checking. I'll look at this once my last exam is over.