MicrosoftDocs / mslearn-mr-adt-in-unity

This is a repo that holds the sample code for the Mixed Reality and Azure Digital Twins in Unity Learn Path
Creative Commons Attribution 4.0 International
68 stars 56 forks source link

Async void error. ADTDataHandler on ADTConnection has been disabled. #10

Open jpietila78 opened 3 years ago

jpietila78 commented 3 years ago

I have tried to complete the MSlearn lesson "Build mixed reality digital Twins with Azure Digital Twins and Unity". I have tried several times as instructed to make the modules through. Each time the part "Exercise - Visualize and interact with simulated operations data using SignalR" ends with an error when pressing the Play button in the Unity Editor. Before that point, there have been no errors all along. Everything has gone as per the instructions. https://docs.microsoft.com/en-gb/learn/modules/connect-iot-hololens-azure-digital-twins-unity/8-visualize-signalr

403 (Site Disabled) -- Async void error. ADTDataHandler on ADTConnection has been disabled. UnityEngine.Debug:LogError (object) Microsoft.Unity.AsyncUtils:LogError (UnityEngine.Behaviour,System.Exception,bool) (at Assets/Scripts/SignalR/AsyncUtils.cs:134) Microsoft.Unity.AsyncUtils/<>c__DisplayClass3_0:b0 (UnityEngine.Behaviour,System.Exception) (at Assets/Scripts/SignalR/AsyncUtils.cs:185) Microsoft.Unity.AsyncUtils/d2:MoveNext () (at Assets/Scripts/SignalR/AsyncUtils.cs:167) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException (System.Exception) SignalRService/d__14:MoveNext () (at Assets/Scripts/SignalR/SignalRService.cs:43) UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

atx-barnes commented 3 years ago

I've also been getting this error recently but get a 404 (Not Found) I've read online that it might have to do with the SignalR managed assemblies that are in the Unity project being out of date and don't work with the Azure SignalR service running in the cloud.

Below is the output from my project today.

404 (Not Found) -- Async void error. ADTDataHandler on ADTConnection has been disabled. UnityEngine.Debug:LogError (object) Microsoft.Unity.AsyncUtils:LogError (UnityEngine.Behaviour,System.Exception,bool) (at Assets/Scripts/SignalR/AsyncUtils.cs:134) Microsoft.Unity.AsyncUtils/<>c__DisplayClass3_0:b0 (UnityEngine.Behaviour,System.Exception) (at Assets/Scripts/SignalR/AsyncUtils.cs:185) Microsoft.Unity.AsyncUtils/d2:MoveNext () (at Assets/Scripts/SignalR/AsyncUtils.cs:167) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException (System.Exception) SignalRService/d__14:MoveNext () (at Assets/Scripts/SignalR/SignalRService.cs:43) UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

atx-barnes commented 3 years ago

@jpietila78 Double check you have something like this https://myprojfuncappxxxxxxxxxx.azurewebsites.net/api in the Url field in the ADTConnection Prefab without the /negotiate that is what fixed my 404 error. Check out this step for more info.