Couldn't find file for package

I tried to package my project recently. The packaged game seemed to work fine up until a part that required an animation montage to load (that worked fine in the editor). I looked into the log, and I found this:

[2019.04.13-15.48.22:790][333]LogStreaming: Error: Couldn't find file for package /Game/Mannequin/Animations/apokalypto/LedgeClimbMontage requested by async loading code. NameToLoad: /Game/Mannequin/Animations/apokalypto/LedgeClimbMontage

Does anyone know how I would resolve this?

1 Like

Ok, so after digging through the output log after my build, I realized that it completely ignored the file it was trying to find. To get around this, I added its folder’s directory to the Additional Asset Directories to Cook array in Project Settings > Packaging > Packaging.

1 Like

thanks. Omg you asked it at 8:25 and replied at 4:20) Weeed

2 Likes

This post getting some attention over time, so i’ll reword my solution.

{previous answer is under this spoiler}
{tl;dr}

In my case this problem was caused by deletion of some assets, while links still persisted somewhere in blueprints, even though assets were deleted properly via editor.

To solve it you need to:

  1. Find BPs causing problem;
  2. Fix them.

1. For searching BPs I recommend using Notepad++ feature “Find in files” to search missed file path over the “Content” folder of your project.

For example, in OP’s case you’d search for /Game/Mannequin/Animations/apokalypto/LedgeClimbMontage

Tip: To speed up search use the *.uasset filter. It’s unlikely for this problem to present in other assets.

Note: at the worst case you may search over the whole project folder without filters. I don’t think i’ve seen such case, but it should help if first option didn’t work

2. “Fixing” in this context in first place means “remove incorrect links to removed assets”. I’ve seen two cases:
2.1 Links are in BP internals, which are inaccessible via editor’s UI. In this case it helps to resave asset.
You can resave assets via:

  • moving some nodes and press “save”;
  • file->refresh all nodes and press “save”; // no real difference from the first option
  • In case of groups of assets in single folder, in content browser you can select folder and press RMB->ResaveAll. Quite useful to fix a problem in a few dozens of files at once. // option is unavailable for single files, only available for folders.

2.2 Links are in Montages. In this case it was a NotifyState that referenced to removed NS class. Just remove broken NotifyStates from the tracks in this case.

2.3 Links are in Levels. Mentioned below in this thread:

I’m now on the 5.0.3 and above solution is still applicable.

8 Likes

What do I do if my level is the one leaving around the bad reference?

what about “refresh all nodes” on a level blueprint? Not sure about it, but it would been my first guess

Thanks, I ended up just deleting all temporary files and repackaging. That got rid of the LogStreaming errors.

Yeah! It’s work for me. Thanks!

Thank you @Apokalypto_1 !
for anyone trying to reference a directory inside a Plugin, you can use
UE4: ./../Plugins/ThePlugin/Content/TheDirectory
UE5: /Game/./../Plugins/ThePlugin/Content/TheDirectory