Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 139 forks source link

ServerError when saving anchors #193

Closed tomkrikorian closed 4 years ago

tomkrikorian commented 4 years ago

Hi, I'm getting a lot of server error when saving multiple anchors. (not using the sample btw, using the SDK in our app). When i save the first anchor, it goes usually fine but then i cannot save more anchors during the session. Most of them return a ServerError code like this :

OnSaveCloudAnchorFailed: Failed to save anchor : System.Exception: Cloud spatial exception error code is ServerError with Message [ Request is 2vBHxxhIQ/O8fkrFdOd4Bg and Response is ] ---> Microsoft.Azure.SpatialAnchors.CloudSpatialException

Same code worked fine last week, are there issues with the Azure Spatial Anchors service ?

craigktreasure commented 4 years ago

Hey @tomkrikorian. Sorry to hear you're having issues like this. Please let me know if you can still reproduce this issue. If so, we'll escalate and take a look. Thanks!

tomkrikorian commented 4 years ago

Reproduced the issue multiple times. Same logs as the one from my first comment. Seems to happen a lot when on a Wifi connexion.

craigktreasure commented 4 years ago

What platform are you using? Android, iOS, HoloLens (1 or 2), Unity (iOS\Android\HoloLens)?

tomkrikorian commented 4 years ago

Test was done on Android (Unity) but we're using all platforms. I'll be able to test on all platforms next week to try and reproduce the issue again.

craigktreasure commented 4 years ago

What version of Unity?

tomkrikorian commented 4 years ago

Unity 2019.2.21f1

craigktreasure commented 4 years ago

Hey @tomkrikorian. Would you mind trying with ASA 2.4.0 using Unity 2019.4? We just released a new build today. We've experienced a lot of bugs in the older Unity 2019 builds and many are fixed in Unity 2019.4. I'm curious if you still have the issue in a more recent release.

tomkrikorian commented 4 years ago

Hey @craigktreasure : I'll try to update our App to use 2.4.0 in the coming month and get back to you on this. :)

tomkrikorian commented 4 years ago

I updated to 2.4.0, now i don't get the ServerError but NotEnoughSpatialData : Cloud Spatial Anchor Session found Error : Not enough Neighborhood Spatial Data was available to complete the desired create or update operation with Error Code NotEnoughSpatialData

i do wait for spatialAnchorManager.IsReadyForCreate && spatialAnchorManager.SessionStatus.ReadyForCreateProgress > 1 before calling CreateAnchorAsync

I'm currently trying on Android with Unity 2019.4.8f1 (ARFoundation 4.1 & ARCore 4.1 packages)

tomkrikorian commented 4 years ago

After further testing, the issue came from our code that had to be udpated after the SDK update :) ASA SDK 2.4.0 works well on Unity 2019.4.8f1 and ARFoundation 4.1.0-preview6, i don't see the ServerError and relocalization issues i had in the past, congrats to your team for this update !

kaysabelle commented 4 years ago

Hi @tomkrikorian, glad to hear it's working after an update to 2.4.0. I'm going to close this issue now.