Assertion failed on expression: 'prefabInstance.GetPrefabModification().m_TransformParent.IsValid()'

I upgraded our project from Unity 2021.3.25 to unty 2022.2.2 to try and solve some issues (IL2CCP compiler errors) when building for the switch. After upgrading the project now won’t build for the PC or Switch now. these are the errors:

Assertion failed on expression: ‘prefabInstance.GetPrefabModification().m_TransformParent.IsValid()’

and

Assertion failed on expression: ‘m_DirectReadCommands.status == AsyncReadCommand::kCompleted || m_DirectReadCommands.status == AsyncReadCommand::kNotUsed’

Has anyone encountered these before and knows how to solve them? The game runs in the editor so I’m assuming it’s some sort of dependency error in one of the scenes or scripts which only shows up when the entire project is exported. There doesn’t seem to be any useful information in the editor log as to what scenes and objects the error refers to.

Thank you

kind regards,

Tony

1 Like

I encountered the same problem, changing Prefab to a Prefab variant resulted in this error

1 Like

I get the same error, but while loading the scene in editor, and objects are getting randomly unparented (using IL2CPP and Unity 2022.1.13f)

Can we get a bug report on this? I am having trouble reaching the area owners due to summer vacations, but assertion failures like these almost always mean bugs in the engine and we’d like to look at them closer.

Hello, any progress on this?

I have a similar issue. If I insert a new prefab variant in the chain by dragging the root from the prefab hierarchy to the project I get this error. All prefab variants “deriving” from this new node are now corrupt and their children disappear randomly. This is beyond frustrating since this causes any prefab management/refactoring to be close to impossible. I use 2023.1.

I am not sure if we ever received a bug report. Can you report one? We need a repro project in order to investigate it.

No, I’ve lost faith in the unity bug reporting system.

I recently spent weeks tracking down some severe issues which were confirmed by unity to be an issue in core unity. Resolved by unity as “Won’t fix” without explanation.

It is not reasonable that we should do your job. Considering the amount of bugs and issues in unity that we have to fight daily I think it would be good if unity staffed up on QA ppl who were on their feet and could vacuum the forum for issues like this instead of putting the responsibility of any progress on the paying customers.

1 Like

Hey guys I’ve submitted a bug report for this - Case IN-60953

I wouldn’t be surprised if this was a tough one to figure out. Thanks @Tautvydas-Zilys and team

Thanks we will take a look!

In 2022.3.15f1 we got this error when a prefab variant suddenly changed its Variant Parent to an unrelated prefab (they do share a scene though?). Visually you could still see what it was previously, but nothing was selectable and its hierarchy became that the wrong parent.

1 Like

I also encountered this problem. Is there a workaround?

Hey mate

I received an email from Unity stating that they won’t be looking to fix this bug. Their response:

Your bug report IN-60953: “Assertion failed on expression:…" errors are thrown when saving changes of a Prefab has been closed with the resolution Won’t Fix.
Resolver: Lucila Sanjurjo
Resolution Notes: Thank you for reporting a bug to Unity. We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available. Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.

1 Like

I have this bug in 2023.2.20f1
What am I supposed to do? I’ve been working on this project for five years, and now it won’t build and Unitys response is “get fucked”?

1 Like

Lost my whole day on this. Trying to create a modular UI, while Unity is working against me. Great…

Just got this error. I did 20 hrs making an intro for my game. Was working perfectly when I left it. Today it loaded with everything in the wrong position and tons of scripts missing… seemed to revert me to about 6 hours previous. But some of the new stuff was still there. Seems like when you “apply all” to a prefab it forgets some of it. Seemed ok until I left it making a webgl build and went out, and somehow thats when the gremlins came out to wreck my day. I actually make a back up before I applied the prefab im assuming that would work but would take hours to check. Fixing might be faster. Maybe the solution is to apply the prefab changes more regularly, or maybe I need to upgrade?