I’m getting path too long problems while staging (using RunUAT).
Even with the project moved down to d:\Projects\ProjectName its still going over the limit:
Project.RunUnrealPak: Running UnrealPak *******
CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.10\Engine\Binaries\Win64\UnrealPak.exe D:\Projects\UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\UE4Cooker\Content\Paks\UE4Cooker-WindowsNoEditor.pak -create="C:\Program Files (x86)\Epic Games\4.10\Engine\Programs\AutomationTool\Saved\Logs\PakList_UE4Cooker-WindowsNoEditor.txt" -order=D:\Projects\UE4Cooker\Build\WindowsNoEditor\FileOpenOrder\CookerOpenOrder.log -UTF8Output
UnrealPak: LogPakFile:Display: Loading response file C:\Program Files (x86)\Epic Games\4.10\Engine\Programs\AutomationTool\Saved\Logs\PakList_UE4Cooker-WindowsNoEditor.txt
UnrealPak: LogPakFile:Display: Added 2 entries to add to pak file.
UnrealPak: LogPakFile:Display: Loading pak order file D:\Projects\UE4Cooker\Build\WindowsNoEditor\FileOpenOrder\CookerOpenOrder.log...
UnrealPak: LogPakFile:Display: Finished loading pak order file D:\Projects\UE4Cooker\Build\WindowsNoEditor\FileOpenOrder\CookerOpenOrder.log.
UnrealPak: LogPakFile:Display: Collecting files to add to pak file...
UnrealPak: LogPakFile:Display: Collected 2 files in 0.00s.
LogTemp: UnrealPak: LogPakFile:Display: Added 2 files, 83148 bytes total, time 0.01s.
CommandUtils.Run: Run: Took 0.2377557s to run UnrealPak.exe, ExitCode=0
Project.CreatePak: UnrealPak Done *******
BuildCommand.Execute: ERROR: BUILD FAILED
Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in mscorlib: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Stacktrace: at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetDirectoryName(String path)
at AutomationTool.CommandUtils.CopyFileIncremental(String Source, String Dest, Boolean bAllowDifferingTimestamps, Boolean bFilterSpecialLinesFromIniFiles)
at Project.CopyManifestFilesToStageDir(Dictionary`2 Mapping, String StageDir, String ManifestName, List`1 CRCFiles)
at Project.CopyUsingStagingManifest(ProjectParams Params, DeploymentContext SC)
at Project.ApplyStagingManifest(ProjectParams Params, DeploymentContext SC)
at Project.CopyBuildToStagingDirectory(ProjectParams Params)
at BuildCookRun.DoBuildCookRun(ProjectParams Params)
at BuildCommand.Execute()
at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
at AutomationTool.Automation.Process(String[] CommandLine)
at AutomationTool.Program.MainProc(Object Param)
at AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param)
at AutomationTool.Program.Main()
ProcessManager.KillAll: Trying to kill 0 spawned processes.
Program.Main: AutomationTool exiting with ExitCode=Error_Unknown
Certainly looks like something is going a bit wild in the creation process - this folder exists on my computer - notive the repetition of “UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor”.
This looks like a problem create when running via a process from the editor (using: FPlatformProcess). Removing the quotes around the project name stops the recursion.
I’m not sure what the proper approach to project names is. Code I’m suing follows:
And really I don’t want to be triggering commandline builds - I’d prefer to use the project launcher I just don’t know how to invoke it from my own plugin.
Well anyway. It wasn’t fixed, I just got a couple of successful stages after removing the "s.
Looks like it adds deeper child directories every time I stage, so I’ve added a directory deletion to the process and that seems to have worked around the problem.
Thank you for all of the information. I’ll be taking a look at this but just started so I don’t have much information yet. I did want to ask however; Are you able to reproduce this issue in a fresh project or is it something only occurring with the project you’re working in? Having a reproduction case would help a lot in a case like this.
Thank you for the steps. Unfortunately, I’m not getting the same issue. Could you specify what settings you’re using for your Release and DLC profiles in the Project Launcher? That is the only thing what was vague about your previous post which could be there the missing detail is.
Thank you for those settings. I’ve reproduced it but I do have a quick question before I put the report in, seeing as the plugin can’t be used in earlier version of the engine. Did this occur for you at all in 4.9 or any earlier builds of the engine or did it start with 4.10.2?
I’m still looking into this problem. I just wanted to let you know that I haven’t forgotten about your issue and I’ll let you know whenever I have more information.
Thanks ! My workflow is out of the norm, which in this case makes it easy for me to automatically nuke the directories ever time I package but I figure it’ll bite others down the line as the plugin system gets more exercise.
I’ve been looking into this further and decided to place a bug report in for the issue. For reference, the report’s number is UE-27067. I’ll be sure to update you on its status when it gets updated, but in the meantime I can’t really think of any other workarounds past deleting those directories.
I’ve fixed this in CL#2871980, there was an issue where the staging code would search for .uplugin files recursively and find the .uplugin that was copied to the Saved folder on the last run. Each new run would copy more files deeper and deeper. Good catch, thanks for reporting it
few days ago i got same problem, i fixed my issue with ‘Long Path Tool’, it was worked for me, you can try, i hope
the problem will fixed. i was searching path too long delete files problem and found it, nice conversation, its helped me.
my friend i was in same issue, i fixed my issue with"Long Path Tool",
i was search -filename too long for
destination folder- and found the video,
its just awesome, thanks nice conversation here if you want you
can try first time and see the result. thanks
I am getting this same issue and its very difficult to solve this problem without any third party app, i guess the best thing to do is to use a third party app like Long Path Tool. Just download it and use it to solve this issue. I hope this would help.
You are getting this problem probably because windows does not allow path name more than 255 characters. Like, consider this example–C:\oraclxe\app\oracle\diag\tnslr\user\listener\me.txt, In this “me” file will not be counted as 2 character but will be counted as number of characters in the path name. You can try GS Richcopy 360. I am currently using this software and it has worked for me and my enterprise to solve all our problems related to file copying. Try it, it helps.