Azure / azure-spatial-anchors-samples

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

System.InvalidOperationException: . Request CV: . Response CV: . at Microsoft.Azure.SpatialAnchors.NativeLibraryHelpers.CheckStatus #324

Closed AnandMulay closed 2 years ago

AnandMulay commented 2 years ago

I don't know what I'm doing wrong, I have multiple scenes where my ASA setup runs and set anchor for the scene, but when i get back to the main menu and load another scene with the same setup i get this error -

System.InvalidOperationException: . Request CV: . Response CV: . at Microsoft.Azure.SpatialAnchors.NativeLibraryHelpers.CheckStatus (System.IntPtr handle, Microsoft.Azure.SpatialAnchors.status value) [0x00000] in <00000000000000000000000000000000>:0 at AnchorModuleScript+FindAnchorDelegate.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.Tasks.Task.Execute () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.TimerCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal


on this line public async void CreateAzureAnchor(GameObject theObject) { CreateLocalAnchor(theObject);

    bool success;

    try
    {
        Debug.Log("Creating Azure anchor... please wait...");

        // Actually save
        await cloudManager.CreateAnchorAsync(localCloudAnchor);    ----- here

i believe it is possible to create a new session and place an anchor multiple times in different unity scenes in a single app.

Unity 2019.4.28 ASA SDK 2.8.1 Hololens 2

msftradford commented 2 years ago

Hi @AnandMulay, thanks for reaching out! Yes, you should be able to load a new scene and create an anchor in the new scene. You can see an example of this with our Unity sample. Can you try that sample on your device, change between scenes, and create an anchor in a new scene? You can see how we clean-up in-between scenes here. Let us know how it goes. Thanks!

no-response[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.