Blueprint files cannot be found during packaging or content cooking

I’m trying to package my project, but things aren’t going very well.

Configuration: Shipping / Win64 / UE 4.8.2. OS: Windows 8.1

No errors occur, the code is compiled without any issues, and I am able to successfully generate a package. However, a HUGE number of warnings are generated in regards to the blueprints in my project. Pretty much all the blueprints as far as I can tell. As a result, when I boot up the exe, the map’s geometry appears, but none of the characters appear and I am just a flying camera.

I have tried a variety of different configurations in packaging (Development, Shipping, tried enabling cooking everything and full rebuild, etc), without any luck.

Edit: Confirmed that the same warnings appear when selecting File → Cook Content for Windows (it’s not limited to full packaging)

One weird thing is that pressing the “Launch” button on the editor toolbar succeeds in building and launching the project, and the exe it generates works correctly as a game. However, building and launching from the ProjectLauncher window in (as far as I can tell) any Variant / Config / Data Build configuration results in the same problems that occur when packaging.

I have no idea what’s going on, although it looks like there might be some issue either referencing the directory where my blueprints are, or some problem compiling or packing the blueprints thus resulting in them not existing? Also I’m not sure what the “Script” directory is, as it doesn’t seem to be an actual physical directory. The sample projects seem to use it as well though (and I confirmed that those package successfully), so I assume it is referencing one of the other directories in the project.

Edit: Also, I have a folder called Game directly below the Content folder. I’m not sure how this is set up, but if there is redirection going on between the “Script” and “Content” folders, and there is an alias called “Game” in there somewhere, would this cause confusion during packaging? This is a total wild guess by the way. Also, it’s a huge headache to change high-level folder names (with all the assets apparently being deeply rooted in the directory structure and such) so I haven’t tested this yet. But the three “LogRedirectors” lines at the top of the below log seem kind of shady…

Anyway, I have spent several hours on this and am at a total loss, so if anyone knowledgeable is around I would really appreciate assistance.

Here is the beginning of the packaging log where things start going wrong. Similar warnings continue for another 50000 lines or so:

LogInit: Initializing Editor Engine Completed
LogAssetRegistry: FAssetRegistry took 0.0002 seconds to start up
LogAssetRegistry: ScanPathsSynchronous completed scanning '/Engine/' and 6 other paths to find 1593 assets in 0.7354 seconds
LogCook:Display: Done creating registry. It took  0.74s.
LogPackageDependencyInfo:Display:    Package Info not found for ../../../project/CookedIniVersion!
LogRedirectors: String Asset Reference '/Script/Engine.GameInstance'
LogRedirectors:     Resolved to '/Script/Engine.GameInstance'
LogRedirectors: String Asset Reference '/Game/Game/Blueprints/GameModeBlueprint.GameModeBlueprint_C'
LogLinker:Warning: Can't find file '/Script/project'
LogUObjectGlobals:Warning: Failed to load '/Script/project': Can't find file '/Script/project'
LogLinker:Warning: Can't find file for asset '/Script/project' while loading ../../../../../../depot/project/Content/Game/Ai/EnemyCharacter.uasset.
LogUObjectGlobals:Warning: Failed to load '../../../../../../depot/project/Content/Game/Ai/EnemyCharacter.uasset': Can't find file for asset '/Script/project' while loading ../../../../../../depot/project/Content/Game/Ai/EnemyCharacter.uasset.
LogLinker:Warning: CreateExport: Failed to load Parent for AnimBlueprintGeneratedClass /Game/Game/Anim/ThirdPersonAnimBlueprint.ThirdPersonAnimBlueprint_C
LogLinker:Warning: CreateExport: Failed to load Outer for resource 'IsHoldingGun?': AnimBlueprintGeneratedClass /Game/Game/Anim/ThirdPersonAnimBlueprint.ThirdPersonAnimBlueprint_C
LogLinker:Warning: Can't find file '/Script/project'
LogUObjectGlobals:Warning: Failed to load '/Script/project': Can't find file '/Script/project'
LogLinker:Warning: Can't find file for asset '/Script/project' while loading ../../../../../../depot/project/Content/Game/Ai/EnemyCharacter.uasset.
LogUObjectGlobals:Warning: Failed to load '../../../../../../depot/project/Content/Game/Ai/EnemyCharacter.uasset': Can't find file for asset '/Script/project' while loading ../../../../../../depot/project/Content/Game/Ai/EnemyCharacter.uasset.
LogLinker:Warning: CreateExport: Failed to load Parent for AnimBlueprintGeneratedClass /Game/Game/Anim/ThirdPersonAnimBlueprint.ThirdPersonAnimBlueprint_C
LogLinker:Warning: CreateExport: Failed to load Outer for resource 'IsCrouching?': AnimBlueprintGeneratedClass /Game/Game/Anim/ThirdPersonAnimBlueprint.ThirdPersonAnimBlueprint_C

I figured this one out on my own.

Also, I have NO IDEA why this solution works.

The problem was my .uproject file.
I compared it to the .uproject files in the (latest) UE4.8.2 sample projects.

In my .uproject file, “LoadingPhase” was “PostEngineInit”, but in the samples it was "Default"
Also, my .uproject file has the segment “AdditionalDependencies”: [ “AIModule” ] for some reason.

I changed all instances of “PostEngineInit” to “Default” and deleted the AdditionalDependencies bit, and packaging worked correctly!!

I’m guessing that something related to the .uproject files changed with some version upgrade of the engine without my .uproject file being updated correctly.

Note to Epic devs: It might be a good idea to put in an error or warning message in the build log when the settings in the .uproject file begin to create problems in the packaging process.