What "is not a valid mod file" means on NeoForge
"Is not a valid mod file" on NeoForge means the loader found a jar in the mods folder and could not read it as a NeoForge mod. The NeoForge mod loader, called FML, has two separate entries behind this one sentence, and they lead to different outcomes:
| Situation | Level | What happens |
|---|---|---|
The jar opens, but no reader accepts it: there is no META-INF/neoforge.mods.toml and no NeoForge mod type in its manifest, and it shows no sign of another loader | Warning | The log says Skipping jar. and the server starts without that file. |
Opening the jar failed with an error other than a broken zip, or reading the jar crashed, for example on a mistake in its neoforge.mods.toml | Error | The start stops. The line appears under Loading errors encountered:. |
So the place in the log tells you which one you have. When the line sits under Loading errors encountered: after Failed to start FML, the server stopped because of it. When it sits under Loading warnings encountered: or after Skipping jar., that jar was left out and the start went on. This works the same way on the NeoForge 1.21.1 loader and on the current one.
On the error path, FML attaches the exception that caused it, and before it stops it writes every problem to the log on its own line together with that exception. The short list at the bottom of the log is a summary. The reason for each jar is higher up in logs/latest.log, on the line with the same file name. How to read crash reports and logs shows how to move through that file.
"Is a Fabric mod and cannot be loaded" and other messages instead of "not a valid mod file"
NeoForge has 9 more specific messages for jars it cannot load, and you may get one of these in place of "not a valid mod file". Seven come from one check: when no reader accepts a jar, FML looks inside it for a file that belongs to another system and names that system.
| Message on NeoForge | What FML found in the jar | What it means |
|---|---|---|
is for Minecraft Forge or an older version of NeoForge, and cannot be loaded | META-INF/mods.toml | A Forge build, or a NeoForge build for 1.20.4 or older. |
is a Fabric mod and cannot be loaded | fabric.mod.json | A Fabric build. |
is a Quilt mod and cannot be loaded | quilt.mod.json | A Quilt build. |
is for an old version of Minecraft Forge and cannot be loaded | mcmod.info | A mod from the old Forge era. |
is a Bukkit or Bukkit-implementor (Spigot, Paper, etc.) plugin and cannot be loaded | plugin.yml | A server plugin, not a mod. |
is not a jar file | Nothing: the file could not be opened as a zip | The file is damaged or not a jar at all. |
has an unrecognized FML mod-type | A mod type in the manifest that FML does not know | A jar that declares a type NeoForge has no reader for. |
Messages for LiteLoader mods and incompatible OptiFine versions exist as well. In the mods folder all of these are warnings and the jar is skipped, except "is not a jar file", which is an error and stops the start.
The Forge row needs one date. NeoForge 20.5, for Minecraft 1.20.5, stopped reading mods.toml. Its release notes say that from 20.5 the only recognized metadata file is neoforge.mods.toml, still in the META-INF folder. A NeoForge mod built for 1.20.1 or 1.20.4 therefore looks like a Forge mod to a newer NeoForge server.
Plain "is not a valid mod file" as a warning is what remains when FML found none of those files either. That fits a jar that is a library without NeoForge metadata, or something else that ended in .jar. If the server starts anyway and the mod is one you need, replace it with its NeoForge build. If you do not recognise the file, removing it is safe for the start, because the loader was already leaving it out.
Why NeoForge says every mod is not a valid mod file
NeoForge can list dozens of jars as not valid in one go because it reads the whole mods folder first and only then decides to stop. The folder is read in alphabetical order, every problem is collected, and if one of them is an error the loader throws a single exception that lists them all. One server we host on NeoForge 26.1.2 stopped like this, with more than 20 jars listed, every one of them named for NeoForge 26.1:
NeoForge 26.1.2, end of latest.log
[main/ERROR] [net.neoforged.fml.startup.Entrypoint/]: Failed to start FML: net.neoforged.fml.ModLoadingException: Loading errors encountered:
- File mods/adorable_eggs-NeoForge-26.1.2-1.0.3.jar is not a valid mod file
- File mods/BiomesOPlenty-neoforge-26.1.2-26.1.2.0.5.jar is not a valid mod file
- File mods/configured-neoforge-26.1.2-2.7.5.jar is not a valid mod file
...
- File mods/TerraBlender-neoforge-26.1.2-26.1.2.0.2.jar is not a valid mod fileThe list alone does not say why. Because these are errors, each jar has its own earlier log line with the exception that made it fail, and that is where the cause is. A long list with one shared cause looks the same at the bottom as a long list with many different causes, so read a few of those earlier lines before you change anything.
The CancellationException above the list
Just above that list the same server logged an error while scanning a jar nested inside another mod:
NeoForge 26.1.2, just before the list
[main/ERROR] [net.neoforged.fml.loading.modscan.BackgroundScanHandler/SCAN]: An error occurred scanning file jar(mods/SubtleEffects-neoforge-26.1-1.14.3.jar) > jar(mods/SubtleEffects-neoforge-26.1-1.14.3.jar > mixinconstraints-1.1.0.ja...
java.util.concurrent.CancellationException
at net.neoforged.fml.loading.moddiscovery.ModFile.close(ModFile.java:246) ~[loader-11.0.15.jar:11.0]
at net.neoforged.fml.loading.FMLLoader.close(FMLLoader.java:245) [loader-11.0.15.jar:11.0]
at net.neoforged.fml.loading.FMLLoader.create(FMLLoader.java:415) [loader-11.0.15.jar:11.0]This one is a result, not a cause. In the loader source, line 415 of FMLLoader.create is the clean-up that runs after startup has already failed, and ModFile.close cancels the background scan of each mod that was still running. The scan of SubtleEffects was cut off because the loader was shutting down. You can leave this line aside and look for the per-jar error lines instead.
How to check which loader a mod jar is for
You can tell which loader a mod jar is for by one file inside it. A jar is a zip archive, so any zip tool on your own computer opens it. Look for these files:
| File inside the jar | Built for |
|---|---|
META-INF/neoforge.mods.toml | NeoForge 20.5 and newer (Minecraft 1.20.5 and up) |
META-INF/mods.toml | Forge, or NeoForge before 20.5 |
fabric.mod.json | Fabric |
quilt.mod.json | Quilt |
plugin.yml | Bukkit, Spigot or Paper, as a plugin |
Some mods ship one jar with more than one of these files. NeoForge reads META-INF/neoforge.mods.toml whenever it is there and only looks for the other files when no reader took the jar, so a jar with both META-INF/neoforge.mods.toml and fabric.mod.json can be fine on NeoForge. A file name with "neoforge" in it is a hint, not proof. When the loader reports an error on a jar that does contain META-INF/neoforge.mods.toml, the file is the right kind and the problem is in reading it. The earlier log line for that jar says what went wrong.
When the jar is right but needs other mods to load, the message changes to a dependency error. That case has its own guide: missing mod dependencies.
How to fix "not a valid mod file" on Lodehost
Fixing "not a valid mod file" on Lodehost comes down to 4 things: find the reason in the log, take the jar out, put in the right build, and start again.
Make a backup first
On the Backups tab, make a backup before you remove anything. If a removed mod turns out to hold world data, you can restore it with the server stopped.
Find the reason for each jar
Open
logs/latest.logon the Files tab and search for the file name of a jar from the list. On an error, the earlier line with that name carries the exception. A different message from the table above, such as "is a Fabric mod", tells you the jar is for another loader.Remove the jar
On the Mods tab, find the file under Installed mods and press Remove. Do this for every jar the log names.
Install the build for your server
Search the mod under Verified Modrinth catalog and press Verify & install. The catalog only offers builds for your server's loader and its exact Minecraft version, and required dependencies come along. The version your server runs is in Settings.
Re-upload a mod that is not in the catalog
Download the build for your loader and Minecraft version from the mod's own page, then use Upload on the Files tab in the
modsfolder, or From link with a direct download address. Compare the file size with the one on the download page. A jar that is smaller arrived incomplete and has to go in again.Start the server and read the end of the log
If the start stops again, the list at the bottom shows what is left. Work through it the same way.
Do not remove the whole list on a guess
When every mod in the folder is listed, the cause may be shared, and removing them all may only hide it. Read the earlier error lines for a few of the jars first. If they point to the same thing and you cannot place it, back up the mods folder before you change it. Server not starting covers what else to check when a start fails.
"Is not a valid mod file" on Forge 1.20.1 and newer
On Forge, "File {2} is not a valid mod file" is a warning, both on 1.20.1 and on the newest Forge branch. Forge collects the files it had to drop as broken and reports them after loading. A dedicated server logs Mods loaded with followed by the number of warnings, prints each one and carries on without those jars. Earlier in the log, Forge writes File ... has been ignored - it is invalid for a jar that failed its checks.
Forge also has more specific messages, "is a Fabric mod", "is for an older version of Forge" and "is not a jar file" among them. On 1.20.1 Forge checks for all of them. On the newest Forge branch, a note in its source says only the "not a jar file" check runs for now, so a Fabric jar there shows the plain "not a valid mod file". A Forge mod is recognised by META-INF/mods.toml, which means a NeoForge mod for 1.20.5 or newer, with only neoforge.mods.toml, is not one Forge can read.
So if a Forge server stops and you see this line, the line itself is not what stopped it. Look further down the log for the error that ended the start. A NoClassDefFoundError or a mixin that failed to apply are two causes with their own guides.
Written and checked by the Lodehost team, last reviewed on 16 November 2026.






