Skip to main content
infoMod ErrorsAffects: NeoForge/Fabric

How to Fix Invalid Mod Configuration

NeoForge fixes or rebuilds a broken mod config on its own and keeps a .bak copy. How to read the log line, get your values back and edit TOML safely.

Quick Fix

Find the config file name in the log, copy your values from the newest .bak file next to it, and fix the value or the TOML syntax the loader rejected.

Error Message

Configuration file /home/steve/.minecraft/config/examplemod-common.toml is not correct. Correcting

How to Fix

1

Open the config folder and look for .bak files next to the config. NeoForge keeps up to five, named like examplemod-common-1.toml.bak, and the one ending in -1 is the newest.

2

Compare the backup with the new file and copy your own values back one by one, keeping the same value type as the default.

3

Edit configs with the game closed or through the mod's config screen. NeoForge watches config files and reloads them when they change, unless disableConfigWatcher is turned on in config/fml.toml.

4

Check the TOML syntax: text values need quotes, lists use square brackets and each key belongs under its [section] header.

5

Fix or delete a broken copy in defaultconfigs or in the world's serverconfig folder, since those can replace or override your file.

6

Fabric has no shared config system. Mods keep their files in the config folder of the game directory in their own format, so check that mod's documentation for the rules.

Common Causes

  • A value is out of range, has the wrong type or a key is missing, which often happens after a mod update. NeoForge logs that the file is not correct, saves a backup and resets each rejected key to its default.
  • The TOML syntax is broken after a hand edit, such as a missing quote or bracket. NeoForge then logs Failed to load config with the parser error, backs the file up, deletes it and writes a fresh one.
  • A broken file sits in defaultconfigs. NeoForge copies a missing config from there first, so a bad copy keeps coming back, and when that copy can't be read either the game stops with Failed to recreate config file.
  • An old copy in the world's serverconfig folder overrides the server config. The log then says Found config file override in path.
  • Two mods use the same config file name, which stops loading with Detected config file conflict and both mod IDs.

Diagnostic Steps

  1. Find the config file name in the log.
  2. Open the newest .bak file next to it.
  3. Copy your values back with the game closed.
  4. Check defaultconfigs and the world's serverconfig folder.
  5. Start the game and read the log again.

FAQ

Why did my mod config reset to defaults?

NeoForge checks every config against the mod's rules when it loads. Before it resets rejected keys to their defaults it saves the old file as a .bak next to it, so your values are still there.

Where are NeoForge server configs stored?

In the config folder, like the other config types. A file with the same name in a world's serverconfig folder overrides it for that world, and NeoForge puts a readme.txt in that folder that explains this.

What do common, client, server and startup mean in config file names?

They are config types. Client configs load only on the client, server configs load with a server or world and are sent to players who join, common configs load on both sides, and startup configs load as soon as the mod registers them.

Related Errors

Need More Help?