Unreal plugin failed to load, GetLastError 126: what it actually means
Error 126 names the wrong file. It is almost never the plugin in the message, it is a dependency that plugin needs. Here is why it happens to Unreal plugins specifically, and how to fix it.
Loading…
Stop bouncing between AI and Unreal.
Drop the plugin into your project, point your MCP client at it, and let your AI actually build inside the editor.
Your editor will not open. There is a dialog saying a plugin failed to load because its module could not be loaded, the log says GetLastError=126, and the DLL it is complaining about is sitting right there on disk where it should be.
Nothing is wrong with your engine install and there is nothing to repair. Here is what error 126 actually means in Unreal, why the file it names is a red herring, and how to fix it.
If you are here about the CodeFizz plugin specifically
This was a real bug in builds before 1.2.44 and it is fixed. Close the editor, run cfa update-all, reopen. The rest of this post is the general explanation, which applies to any Unreal plugin throwing 126.
What error 126 actually means
126 is a Windows error code, and it reads the specified module could not be found. The important part, and the reason this wastes people's afternoons, is that it usually is not about the module named in the message.
When Windows loads a DLL it also loads everything that DLL depends on. If any link in that chain is missing, the load fails and the error points at the DLL you asked for, not the dependency that was actually absent. So Unreal tells you plugin X failed, you go and look, and plugin X is present and correct.
Plugin 'YourPlugin' failed to load because module 'YourPlugin' could not be loaded. There may be an operating system error, the module may not be properly set up, or a plugin may be missing.
"Or a plugin may be missing" is the clue, and it is doing a lot of quiet work in that sentence.
Why this bites Unreal plugins in particular
Unreal ships a large number of plugins that are disabled by default, including experimental ones most projects never enable. If a third-party plugin links against one of those, it now has a dependency the editor will not load, and you get 126 on startup with a message pointing at the wrong file.
That is exactly what happened in our case. Builds before 1.2.44 linked a couple of Unreal's experimental Insights plugins, which ship turned off. On most setups nothing happened. On Unreal 5.8 projects opened with the launcher-installed engine, the chain broke and the editor refused to start, naming a UnrealEditor-WorldStreamingInsights.dll that was present the whole time.
The fix on our end was to stop linking them, so there is no longer a dependency for the editor to miss.
How to fix it
For our plugin, close the editor first. The plugin file is locked while it runs, and an update that cannot write leaves the old build in place and the same error waiting for you.
Update every install:
bash
cfa update-all
Or reinstall for one engine:
bash
cfa install-plugin "C:/Program Files/Epic Games/UE_5.8"
Confirm the version actually changed:
bash
cfa plugin status
That last step is the one people skip, and it is the reason the error sometimes appears to come back. If the editor was open during the update, nothing was written.
If it is a different plugin
The same reasoning applies to any plugin throwing 126, and the debugging order is roughly:
One. Read the log rather than the dialog. The dialog names the plugin; the log usually names a specific DLL further down, and that name is your actual lead.
Two. Check whether that DLL belongs to an engine plugin that is disabled. If it does, enabling that plugin will often clear the error immediately, which also confirms the diagnosis.
Three. Check the plugin was built against the engine version you are opening. A 5.7 binary in a 5.8 project fails in exactly this way, because the engine ABI differs between versions and each one needs its own build.
Four. If it is a third-party plugin, tell the author. This class of bug is invisible on the developer's own machine, where the dependency is enabled because they were working on it.
What it is not
It is not a corrupt engine install, and reinstalling Unreal will not help. It is not a Visual C++ redistributable problem in this case either, though that is the other common cause of 126 in non-Unreal software, which is why searching the raw error code sends you down that path.
If you hit something that is not covered, mail contact@codefizz.dev with the command you ran and its output. It is one person reading, and the answer usually comes back the same day.
Try it on your own project
CodeFizz Editor Agent
This is the plugin the fix above applies to. 900+ commands across 28 categories, on UE 5.6, 5.7 and 5.8. Drive it from Claude Code, Cursor, VS Code, or any MCP client.
Three day free trial. No card, nothing locked off, and it runs on your real project.