MikkelS_HoloCare
2 months agoExplorer
Enrolled devices in MHMS breaks Shared Spatial Anchors
We are experiencing an unexpected and undocumented bug with the SharedSpatialAnchors when having the devices enrolled into Meta Horizon Management System. We've have reached out to MHMS through work.meta.com, though they redirected us to post our problem on this forum instead.
The problem:
When restarting a device that is enrolled in MHMS the SharedSpatialAnchors of our application no longer works.
Our application works as expected on devices not rolled into MHMS, and it also works the first time opening the app after enrolling the device into MHMS. However, when restarting the enrolled device the SharedSpatialAnchors no longer works. This happens for all devices we have attempted to enroll into MHMS, where enrolled devices fail after a restart whereas non-enrolled ones works as expected.
Our application works as expected on devices not rolled into MHMS, and it also works the first time opening the app after enrolling the device into MHMS. However, when restarting the enrolled device the SharedSpatialAnchors no longer works. This happens for all devices we have attempted to enroll into MHMS, where enrolled devices fail after a restart whereas non-enrolled ones works as expected.
The failure we are experiencing is this weird failure when saving the anchors (OVRSpatialAnchor.SaveAsync). The returning OVRAnchor.SaveResult gives FailurePermissionInsufficient, a failure message documented as "User has not granted all the required permissions for the app to use this API" but otherwise not stated in the guides.
Note that this is not the settings for Enhanced Spatial Services, which would have given the SpaceCloudstorageDisabled error. As this the name suggests it has something to do with the permissions and settings of the application we have scoured these several times in both MHMS and on the Quest 3 itself, and cant see any reason why this only happens after a restart.
Our setup:
We are using Quest 3 devices with the latest OS version v77.1027, using Unity v2022.3.60f, and the Meta SDK v77.0. The device is enrolled into a simple MHMS Device Preset with Social Features turned on, while the developer settings are enabled. On the Quest 3, the Enhanced Spatial Services is toggled.
The attached screenshot is of the code creating and saving the saved spatial anchors, though we are fairly certain it ha nothing to do with the code:
Line 138 creates the OVRSpatialAnchorcomponent on a new gameobject and the method in line 144 ensures that it has been created.
In line 146 we call OVRSpatialAnchor.SaveAnchorAsync, which gives the SaveResult FailurePermissionInsufficient in line 151.
The guides we have used to create our application is the official Spatial Anchors Overview guide on Shared Spatial Anchors:
Spatial Anchor guide from Core SDK 77:
https://developers.meta.com/horizon/reference/unity/v77/struct_o_v_r_anchor
https://developers.meta.com/horizon/reference/unity/v77/struct_o_v_r_anchor
The troubleshooting guide linked was of no help as it did not mentioned the experienced error: