Unity 2021.3.9 build error invalid propertyPath

Hi,
I updated unity to 2021.3.9 and tried to build IL2PCC win, but I got this error:

Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)‘managedReferences[2591244572266856457].cmp’, with value ‘’

Please help me to solve it

Do we have fix for this issue ?

The only workaround I found is to use a text editor to find the reference and delete it. In general, it also means that a reference has been lost so you may have to set the reference/value on this property again.

I am not really sure of what it is the cause but I think this something like that:

Say we have a prefab and an instance of it in the scene.
In your prefab, you have a property that use [SerializeReference]. You setup an instance that have a property ‘cmp’ and set a value.
Internally, it will create something like in your prefab asset (look at the reference id):

- rid: 2591244572266856457
[...]
references:
  version: 2
RefIds:
    - rid: 2591244572266856457
      type: {yourClass}
      data:
         _cmp: {any value}

Then, in the prefab instance in the scene, you override the value. In your scene asset, it will create something like (look at the reference id):

    - target: {fileID: ..., guid: ..., type: 3}
      propertyPath: managedReferences[2591244572266856457].cmp
      value: {any new value}

Now, you make some changes in the prefab and decide to get ride of the instance of your interface property. This change now replace 2591244572266856457 by, saying, 5166781093476565058.
Your prefab is now okay but when you go back to your scene, the file still contains a “prefab override” whose the property path still reference the old id (2591244572266856457).
Then, it will display you that: Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[2591244572266856457].cmp', with value '{whatever}'

It is just a hypothesis but perhaps it can help. Despite [SerializeReference] being really really really useful (it is so much powerful), I think I will stop using it while this bug is not fixed (I think it will need a big rework of how things work if my hypothesis is valid) since it corrupts your prefabs/scenes, introducing value/reference losses and prevent buildings.

7 Likes

Would be great to get some idea of where this is happening. The error message just gives the property name and doesn’t say what prefab or even what script.

3 Likes

Same here. Do we have some fix of this error
2021.3.28f1

1 Like

Encountered this on 2021.3.30f1 Mac.

Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)‘managedReferences[3449465115153006597].EventOriginTransform’, with value ‘’

Edit - luckily the corruption occurred in a script-generated scene, so I could overwrite it.

Any Perfect Fix for this issue!!!

We keep running into this error also. Very annoying - especially that the fix is dependent on a text-editor, and cannot be handled via the Unity Editor itself.

Indeed, this happens when renaming / moving classes when using [SerializeReference].
I wish there was a better, in-editor way to fix this.

This bug is SO FRUSTRATING, it should be fixed ASAP by Unity…

Have my vote too, this is really inconvenient, takes a lot of time to track down and remove the stale references…

Also having this issue in Unity 2022.3.12f1, this is very frustrating, can someone from Unity PLEASE address this and how we can avoid it happening while you guys make a fix?

Just a way to see where the issue is happening would be good. A better error message is all I am asking for :slight_smile:

I found to get rid of this message, is to click the x Unused overrides “button” shown when inspecting the object overrides.
The error comes from the fact that when removing or changing scripts and/or script fields the previously serialized data in the scene remains (by design). For regular serialized fields [Serializefield] this is no problem (apart from the fact that it bloats the scene at some point). But it seems that for fields serialized with [SerializeReference] the path is checked for validity, which obviously is no longer valid due to removal or changes in the prefab.

9511822--1340575--upload_2023-12-5_10-15-0.png

13 Likes

Thank you so much!!

1 Like

You saved my life with this one, thank you so much!

1 Like

Another great option which worked for me I found on GitHub by Marc-Antoine Girard

Origin:
This is indeed an error from Unity, which can appear when a prefab contains a SerializedReference variable (which ItemViews do) and overrides the value of something that doesn’t require an override. It’s pretty hard to reproduce since Unity usually tracks these things, but AFAIK, it should mostly happen when dealing with branches and Version Control.

How to Fix:

  • Copy the GUID in the managedReferences[GUID here] error. Then, open your scene (the one that triggers the error) in a Text Editor.
  • CTRL+F (find) it in the file. Once you find it, it should look like this:
- target: {fileID: 7062939149101832317, guid: [GUID here],
type: 3}
propertyPath: Label
value: Something
objectReference: {fileID: 0}
  • This is a Prefab override block. Select everything from -target to objectReference (basically the whole block) and delete that. Repeat the search and delete until there’s no more block like that with that GUID.
  • Open Unity and Reload your scene. It should be fix now :slight_smile:
2 Likes

This is the solution, thank you very much. This error occurs in version 2022.3.21f1, as well.