MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.47k forks source link

Out of ideas. Cannot Get Azure Spatial Anchors to Work #108773

Closed LinusdP closed 1 year ago

LinusdP commented 1 year ago

Hi,

I have been trying to get Azure spatial Anchors to work on Hololens 2 for a while now without any luck. I have tried different versions of Unity and ASA-SDK. I have several successful builds with different versions but none of them let's me create spatial anchors.

I have also tried on different Azure accounts. I have tried with both a Hololens 2 setup up as a Work-account and one as a private account. I have no more ideas on what to do to continue...

Debug-log from when I try to create an anchor. Before this everything works out. A sessions is created and I can list existing anchors (which there are none)..

ASA - Saving cloud anchor... UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object)

d__13:MoveNext() System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean) System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean) System.Runtime.CompilerServices.MoveNextRunner:Run() UnityEngine.InputSystem.d__2:.ctor(Int32) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean) System.Threading.Tasks.Task:FinishContinuations() System.Threading.Tasks.Task:FinishStageThree() System.Threading.Tasks.Task`1:TrySetResult(TResult) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Task`1) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult() Microsoft.Azure.SpatialAnchors.Unity.d__5:MoveNext() System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean) System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean) System.Runtime.CompilerServices.MoveNextRunner:Run() UnityEngine.InputSystem.d__2:.ctor(Int32) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean) System.Threading.Tasks.Task:FinishContinuations() System.Threading.Tasks.Task:FinishStageThree() System.Threading.Tasks.Task`1:TrySetResult(TResult) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Task`1) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult() Microsoft.Azure.SpatialAnchors.Unity.d__4:MoveNext() System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean) System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean) System.Runtime.CompilerServices.MoveNextRunner:Run() UnityEngine.InputSystem.d__2:.ctor(Int32) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean) System.Threading.Tasks.Task:FinishContinuations() System.Threading.Tasks.Task:FinishStageThree() System.Threading.Tasks.Task`1:TrySetResult(TResult) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult) Microsoft.Azure.SpatialAnchors.Unity.d__11:MoveNext() System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean) System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean) System.Runtime.CompilerServices.MoveNextRunner:Run() UnityEngine.InputSystem.d__2:.ctor(Int32) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean) System.Threading.Tasks.Task:FinishContinuations() System.Threading.Tasks.Task:FinishStageThree() System.Threading.Tasks.Task`1:TrySetResult(TResult) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult) Microsoft.Azure.SpatialAnchors.Unity.d__7:MoveNext() System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object) UnityEngine.UIElements.Values`1:get_isEmpty() System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean) System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean) System.Runtime.CompilerServices.MoveNextRunner:Run() UnityEngine.InputSystem.d__2:.ctor(Int32) System.Threading.Tasks.<>c:<.cctor>b__7_0(Object) UnityEngine.InputSystem.WriteMapJson:FromMap(InputActionMap) ASA - Debug: StoreAndWatcherTrackedState::TryCreateInternalAsync for a new SpatialAnchor. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) ASA - Debug: StoreAndWatcherTrackedState::TryCreateWithNewNeighborhoodAnchor UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) The thread 0x161c has exited with code 0 (0x0). ASA - Debug: GetNeighborhoodDataAsync - spatialAnchorQueryRoot == spatialAnchorLocationOrigin, skipping blob modification UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) The thread 0xe2c has exited with code 0 (0x0). ASA - Debug: RestClient::CreateNeighborhoodAnchorAndSpatialAnchorAsync - ReqCV: mJgHf5rYR0qAdv1A8Kmtlg UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) The thread 0x1260 has exited with code 0 (0x0). The thread 0x834 has exited with code 0 (0x0). Exception thrown at 0x00007FFB144159FC (KernelBase.dll) in Holo2SABlank.exe: 0x800706BA: The RPC server is unavailable. onecore\com\combase\dcomrem\preventrundownbias.cpp(1310)\combase.dll!00007FFB14015D80: (caller: 00007FFB14015C3C) LogHr(1) tid(d68) 800706BA The RPC server is unavailable. The thread 0x570 has exited with code 0 (0x0). The thread 0xb3c has exited with code 0 (0x0). The thread 0x1858 has exited with code 0 (0x0). The thread 0xe7c has exited with code 0 (0x0). The thread 0x1284 has exited with code 0 (0x0). The thread 0x574 has exited with code 0 (0x0). The thread 0x764 has exited with code 0 (0x0). The thread 0x634 has exited with code 0 (0x0). The thread 0xc88 has exited with code 0 (0x0). The thread 0x1504 has exited with code 0 (0x0). The thread 0x163c has exited with code 0 (0x0). The thread 0x10ac has exited with code 0 (0x0). The thread 0x1768 has exited with code 0 (0x0). The thread 0x86c has exited with code 0 (0x0). The thread 0x190c has exited with code 0 (0x0). The thread 0x17f8 has exited with code 0 (0x0). The thread 0x694 has exited with code 0 (0x0). The thread 0x19bc has exited with code 0 (0x0). The thread 0xbcc has exited with code 0 (0x0). The thread 0x1830 has exited with code 0 (0x0). The thread 0xbd8 has exited with code 0 (0x0). The thread 0x11e8 has exited with code 0 (0x0). The thread 0x1aac has exited with code 0 (0x0). The thread 0x149c has exited with code 0 (0x0). The thread 0x18e0 has exited with code 0 (0x0). The thread 0x758 has exited with code 0 (0x0). ASA - Debug: RestClient::GetAccessTokenAsync - Unsuccessful getting access token! ReqCV: rbnmI//NQrSDQwawEZG2cA, RespCV: , HttpResponseCode: 0, Message: 'TokenException -The token service encountered an error.' UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) Exception thrown at 0x00007FFB144159FC in Holo2SABlank.exe: Microsoft C++ exception: TokenLib::TokenException at memory location 0x0000005A64AFF2A0. ASA - Debug: Unable to obtain authentication token: {TokenException -The token service encountered an error.} UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) ASA - Debug: ServerUnreachable: Could not establish Pose Query Processor Stream! UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) <>c:b__7_0(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.Unity.SpatialAnchorManager:OnLogDebug(Object, OnLogDebugEventArgs) TMPro.TextMeshPro:GenerateTextMesh() Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession:OnLogDebugStaticHandler(UInt64, IntPtr) [Enter feedback here] --- #### Document Details ⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.* * ID: e3aab4c6-3e00-857c-e9a1-0a4023897b2f * Version Independent ID: b92bc135-0ced-3eea-00ae-1a941c6f4c65 * Content: [Tutorial: Create a new HoloLens Unity app - Azure Spatial Anchors](https://learn.microsoft.com/en-us/azure/spatial-anchors/tutorials/tutorial-new-unity-hololens-app?tabs=azure-portal) * Content Source: [articles/spatial-anchors/tutorials/tutorial-new-unity-hololens-app.md](https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/spatial-anchors/tutorials/tutorial-new-unity-hololens-app.md) * Service: **azure-spatial-anchors** * GitHub Login: @pamistel * Microsoft Alias: **pamistel**
Naveenommi-MSFT commented 1 year ago

@LinusdP Thank you for bringing this to our attention. I've delegated this to content author @pamistel, who will review it and offer their insightful opinions.

Naveenommi-MSFT commented 1 year ago

@pamistel Could you please review add comments on this, update as appropriate.

LinusdP commented 1 year ago

I got it working. I can´t really say what is different now. The only thing I did was starting completely new Unity-project. I followed the exact same steps again and it is now working.