Cook error in game instance referencing subsystem which is not used

When packaging a game in UE v5.5 I’m getting the following cook error…

LogBlueprint: Error: [Compiler] This blueprint (self) is not a MyAudioSubSystem, therefore ’ Target ’ must have a connection. from Source: /Game/Blueprints/GI_MyGame.GI_MyGame

The error is clear enough but when going into this game instance object GI_MyGame there are no errors visible. The blueprint compiles fine. There is no mention or usage of MyAudioSubSystem anywhere that I can see in the game instance blueprint. Running a find in files on the project certainly I can see the subsystem used in different parts of the project but it doesn’t show anything in the game instance. I have tried deleting the Saved folder and DerivedDataCache folders and re-starting the project still results in the same error.

Steps to Reproduce

Hey there!

Could you please give some more info about how your blueprint is setup? Cook logs and a screenshot of the blueprint in question would be helpful, thank you.

Ben

Hi [mention removed]​ thanks. Here’s a screenshot of the blueprint. Running off of EventInit is the only thing that’s in there right now. Working on collecting logs as well.

[Image Removed]

this error reads backwards but has a precise mechanism: the blueprint compiler validates every function graph against the class it compiles into, including graphs on disabled or unused paths. your game instance blueprint was compiled at some point against a version of the audio subsystem class (or a parent class that contained the call), and a stale compiled reference is stuck in the blueprint’s saved data even though the visible graph looks clean.

the standard repairs, in order of least destructive:

  1. the classic stale pin: open the game instance, find every get subsystem / subsystem call, and re-drag the class input pin fresh. a pin that once connected to a class that later changed name, moved folder, or got deleted keeps a hard reference in the compiled data. rebuild and save each affected function.
    1. full clean recompile: refresh all nodes (file menu), and if that fails, temporarily delete the subsystem function calls, save, re-add them. the point is to force the saved compiled bytecode to regenerate.
    1. check class defaults: the class default object can carry the stale reference even when graphs are clean. setting any property on the game instance and saving forces CDO regeneration.
    1. verify the class reference directly: reference the audio subsystem class in a scratch blueprint, confirm the class itself resolves. if the class does not resolve, the real problem is the subsystem’s module or plugin is not loaded in the cook context (editor-only module shipping mistake), which surfaces exactly as this not-a-X error from unrelated blueprints.
      to prevent the class of problem: subsystem type pinning works best when the subsystem lives in a runtime module or plugin that is enabled in all contexts. a subsystem classed in an editor-only module compiles fine in editor but poisons every blueprint that ever pinned it, at cook time.