Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HoloLens 2: Microsoft.Azure.SpatialAnchors.CloudSpatialException #181

Closed
Ib594 opened this issue Jun 3, 2020 · 9 comments
Closed

HoloLens 2: Microsoft.Azure.SpatialAnchors.CloudSpatialException #181

Ib594 opened this issue Jun 3, 2020 · 9 comments

Comments

@Ib594
Copy link

Ib594 commented Jun 3, 2020

The guides, I'm following:
https://docs.microsoft.com/de-de/windows/mixed-reality/mrlearning-asa-ch1
https://docs.microsoft.com/de-de/windows/mixed-reality/mrlearning-sharing(photon)-ch1

My setup:
Unity 2019.2.17.f1
MRTK 2.3
ARFoundation 2.0.2
AzureSpatialAnchors.unitypackage
MRTK.HoloLens2.Unity.Tutorials.Assets.AzureSpatialAnchors.2.3.0.1.unitypackage
MRTK.HoloLens2.Unity.Tutorials.Assets.GettingStarted.2.3.0.3.unitypackage
MRTK.HoloLens2.Unity.Tutorials.Assets.MultiUserCapabilities.2.3.0.0.unitypackage

What I already did:

  • Capabilities are set in unity and in the solution via visual studio (→Package.appxmanifest)
  • HoloLens update
  • Credentials are set the right way (Account ID and Primary key), generated new keys aswell
  • Different Azure Spatial Cloud servers
  • New project with same setup
  • 2 different guides
  • different wireless networks (in case of a network related problem)

I always get the same exception when creating an azure spatial anchor, connecting to the azure service and photon works without any problems.

Log:
UnityPlayer.log

@MartinPyka
Copy link

MartinPyka commented Jun 4, 2020

Just to clarify: the log file contains a stack trace that is thrown, when we try to create an Anchor in Azure. The stack trace starts with:

Microsoft.Azure.SpatialAnchors.CloudSpatialException
at Microsoft.Azure.SpatialAnchors.NativeLibraryHelpers.CheckStatus (System.IntPtr handle, Microsoft.Azure.SpatialAnchors.status value) [0x00000] in <00000000000000000000000000000000>:0
at System.Action.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 UnityEngine.AudioClip+PCMReaderCallback.Invoke (System.Single[] data) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.Tasks.Task.ExecuteEntry (System.Boolean bPreventDoubleExecution) [0x00000] in <00000000000000000000000000000000>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00000] in <00000000000000000000000000000000>:0

@polinenibharat
Copy link

polinenibharat commented Jun 7, 2020

Thank you for the post. We at the Azure Spatial Anchor's team acknowledge the issue and will investigate.

@Ib594 Ib594 closed this as completed Jun 19, 2020
@Ib594 Ib594 reopened this Jun 19, 2020
@Ib594
Copy link
Author

Ib594 commented Jun 19, 2020

We had Authentication issues, editing the SpatialAnchorManager.cs and adding the account domain could solve the problem.

@Ib594 Ib594 closed this as completed Jun 19, 2020
@Arc-Soul
Copy link

Is the problem really solved?
I still have the issue.
@Ib594 : editing the SpatialAnchorManager.cs and adding the account domain could solve the problem.
I saw the script, but it don't contain account domain. How should I add it?

@19valentin99
Copy link

@Arc-Soul , I have encountered the same problem (and I spent a couple of days trying to solve it) but after I saw at the bottom right of the tutorial page there is a link with "View all page feedback" (https://github.com/MicrosoftDocs/mixed-reality/issues?utf8=%E2%9C%93&q=%222089610b-9581-ea9b-11c5-7be97e53c584%22&in=body) and one of the posts says that if you create an Azure Spatial Anchor for "East US 2" the problem will be fixed (there is also an explanation on how to use other region but this worked for me).

I hope that this will fix your problem.

@chwarr
Copy link
Member

chwarr commented Nov 4, 2020

Please make sure to configure the account's domain to match what you see in the Azure portal for your account. Please do not rely on an unset domain defaulting to East US 2.

@Efaq
Copy link

Efaq commented Dec 9, 2020

@chwarr could you please give more details about "make sure your code configures your Azure Spatial Anchor's account domain"? Exactly which part of the code? And how to configure the ASA account domain? I have had a hard time finding documentation about it, and the problem still persists for me.

Thanks!

@chwarr
Copy link
Member

chwarr commented Dec 9, 2020

See if these sections of the documentation help, @Efaq:

If none of these work, can you open a new issue with the details of what you're encountering?

@khilesh55
Copy link

Folks, I had been super confused for two whole days during which I tried 20+ different fixes for this issue. I was getting the exact same stack trace segment that OP was getting.

Finally I noticed that my free account credits had run out. I logged in with a company subscription, created a new spatial anchors resource, copied down the credentials for it, put the credentials in Assets/AzureSpatialAnchors.SDK/Resources/SpatialAnchorConfig [API Key mode], and also in the ParentAnchor gameobject's SpatialAnchorManager component (I'm using this tutorial https://docs.microsoft.com/en-us/learn/modules/azure-spatial-anchors-tutorials/5-exercise-save-retrieve-share-azure-spatial-anchors?ns-enrollment-type=LearningPath&ns-enrollment-id=learn.azure.beginner-hololens-2-tutorials)

Now everything works just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants