I’m trying to package my UE5 project into the standalone build, but every time I build and launch it, I face the same error:
Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\Misc\PackageName.cpp] [Line: 771]
FilenameToLongPackageName failed to convert ‘’. The Result would be indistinguishable from using ‘’ as the InFilename.
Metter the fact that when I launch the game from the editor as a standalone game it works just perfectly.
I already tried:
Deleting binaries, build, saved, intermediate and other temp folders - doesn’t help
Moving project root into disk root to reduce path size - doesn’t help
Checked gameplay tags - all good
Also, when building I’m not receiving any errors, all clear.
I have already researched the whole internet and found only two posts regarding this error. One was fixed by removing symbols from gameplay tags (which is not my case) and the second one re-created the project in UE5 (which is not my case too bc project is initially created in UE5).
Any thoughts on what could I do to fix it? The situation seems quite desperate.
Could it be due to the project name itself? How long is the project name? Perhaps it is the part that is causing the problem (moving it to other directories in this case wouldn’t help).
There is normally a warning when you create a project with a too long name.
Does you project name or any of its directories have any letters outside of the latin alphabet?
I’ve seen many project fail to compile because they had letters in different native languages.
Pretty sure that all characters in the project are latin alphabet. Support long paths are already turned on & Fix redirections on the whole content folder gives no effect
As a last ditch resort you could try building the engine from source, put a break point on the FilenameToLongPackageName() before package and see it trigger.
You would at least see the passed in parameters that could give you a hint why it’s failing.
For everyone who is probably looking for salvation from this issue:
Thanks to @3dRaven advice - I’ve built UE5 from the source and after inspecting of TryConvertFilenameToLongPackageName method I’ve found that the issue was in some empty filename. I was unable to find what file exactly it was, but my solution was in adding a few simple lines of code to this method to skip file conversion if It’s empty, and now It works just fine and is building & packaging project without any issues as well.
I fixed this by just copying and pasting the intended directory into the “List of maps to include in a packaged build” field, because when you try to input it the normal way, it adds the …\ which unreal can’t read.
Worked for me after that.