Polyspatial - Vision OS 2 Beta - InvalidOperationException: Trying to access unloaded resource

Hey, we are porting our unity app in vision os, the implementation was going well until we upgraded to vision os 2 beta, and upgraded the polyspatial packages to 2.0.0-pre.11. In the device, the app freezes when we dynamically load our meshes, and the following error repeats in XCode.

InvalidOperationException: Trying to access unloaded resource! [c67286f0-fcb0-4286-9ba5-43f93dbfa1cf:0 (has 0 polyspatial refs, is unity referenced): resource alive: False iid=-90792 name= type=Mesh
  at Unity.PolySpatial.Internals.AssetRepresentation.get_Resource () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChangedAsset (Unity.PolySpatial.Internals.AssetRepresentation representation) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.LowLevel.PlayerLoopSystem+UpdateFunction.Invoke () [0x00000] in <00000000000000000000000000000000>:0 

In the simulator, the Play to device stops with ‘Lost Connection’ message, before that point, and without any logs in the console, so we can’t debug in the unity editor.

Is this a known bug? I’ve seen similar issues reported in the past, but marked as fixed in the changelogs.

We fixed an issue in 1.1.1 that was causing that error specifically when scenes were loaded or Resources.UnloadUnusedAssets was called with sprites in the scene, because we weren’t retaining strong references to the materials they were using. The error you’re seeing might be related, but involve a different area of the code. It would be great if you could submit a bug report with a repro case (and let us know the incident number: IN-#####) so that we can see what might be causing the issue.