cancel
Showing results for 
Search instead for 
Did you mean: 

Spatial Anchor Cloud Save Fails

Hello, I'm trying to use "Shared Spatial Anchor" API in my project. When I try to Cloud Save my anchors, sometimes it succeeds but sometimes it fails. And somecase this Quest 2 device works but the other Quest 2 devices doesn't work. Please tell me what might be the cause of the failure.
 
FYI, I get the logs below when the cloud save fails:
2023-04-19 10:27:27.178  4616-5972  [CT]                    com...k.spatial_persistence_service  E  xr_vega_map_service: Failed to upload & async ingest map with error: std::runtime_error: TigonNetworker: request failure: TransientError domain: CURLcode code: 28 detail: 28: Failed to connect to graph.oculus.com port 443 after 30366 ms: Connection timed out
2023-04-19 10:27:27.179  4616-5972  [CT]                    com...k.spatial_persistence_service  E  xr_cloud_anchor_service: Failed to upload spatial anchor with error: std::runtime_error: Failed to upload map
2023-04-19 10:27:27.179  4616-5972  [CT]                    com...k.spatial_persistence_service  I  CasNetworkTelemetryObserver: CasNetworkTelemetryObserver onError
2023-04-19 10:27:27.181  5640-5725  [CT]                    com.stoicdev.ssatestprojectref       E  SP:AF:AnchorFrameworkSlamAnchor: saveAnchor failed!
19 REPLIES 19

JeffNik
MVP
MVP

Well, that's very interesting. I did implement a new call to "Localize" the unbound anchors upon loading them that I didn't have before - that's the only change since we last updated each other here, but that shouldn't have fixed anything in the save process. But I confirmed again this morning, the whole cloud "create", "save", "share", "load" process is working consistently between all friends and between my QP and Q2.

Atrujanox
Explorer

I am thinking this has something to do with project status, is your project fully verified? I have mine still in draft and I am thinking (but only speculating) that the cloud services are somewhat limited to a few queries each hour

I'm not sure what you mean by "project status" - my app has been uploaded to alpha channel only, and I have never actually submitted anything for review or actual release by Meta. 

Atrujanox
Explorer

I am coming to a solution that has something to do when the app is re-initiated, leaving the app stopped some minutes to then try again makes it work well, but if I close the app and then open it again after some seconds looks like the saving and loading behaviours stop responding, not even giving error or success messages.
Maybe the solution is closing a session with oculus services or something before closing the app. Which I don't still know how to do it but will investigate further.

JeffNik
MVP
MVP

I came to the same theory/conclusion - that something wasn't closing down correctly on the device or on the Meta network between runs. But 100% of my issues with it are corrected now. How frustrating to NOT know what the actual problem was.  Maybe I'll try creating a new app to see if I can replicate the issue again. 

Glad I see your theory after 10 hours investigating the strange issue, i.e. the sample project only works well on the first try and could share the anchors with others, but it did not share any anchor (even the log said it has uploaded the anchor's data successfully) to other players if I restart the program within few minutes. 

My finding is that the anchor sharing mostly works fine after 10+ minutes 'cooling off' period. 

Atrujanox
Explorer

That is exactly the same issue I am facing right now, that cooldown period may have omething to do with Oculus services but the thing is some people like Jeff has no issue at all.

Tried testing on same unity version 2022 and the problem persists.

WilhelmBreach
Explorer

Shared Spatial Anchors started working for us once we upgraded to OS version 53. This is (currently) available on the public test channel. https://www.meta.com/help/quest/articles/headsets-and-accessories/using-your-headset/quest-ptc/

Atrujanox
Explorer

@gshape I can confirm the v53 update did solve the issue, can you check if you got rid of the issue too? I did test 3 consecutive times without any problems

Yes, I can confirm it works fine on v53 for 2 devices. Thank you!