Lightship Shared AR throws instant Null Reference Exception

Include the following details (edit as applicable):

  • Issue category: Lightship Maps / Semantic Segmentation / Multiplayer / Real-time Mapping-Depth / ARDK Documentation / Unity Example Package / ARDK Virtual Studio Tools / Developer Tools / Networking
  • Host machine & OS version: Mac M1 Ventura
  • Issue Environment : Unity Remote / Unity Mock / On Device / Dev Portal
  • ARDK version: 2.5.2
  • Unity version: 2021.3.f201

Description of the issue:

When I import the Shared AR Sample Template from the Lightship Hub / Shared AR Template, I receive the following error message:

NullReferenceException: Object reference not set to an instance of an object
Niantic.ARDK.AR.Networking.ARNetworkingFactory._CreateVirtualStudioManagedARNetworking (Niantic.ARDK.AR.IARSession arSession, Niantic.ARDK.Networking.IMultipeerNetworking networking, Niantic.ARDK.VirtualStudio._IVirtualStudioSessionsManager virtualStudioSessionsManager, System.Boolean isLocal) (at Assets/ARDK/AR/Networking/ARNetworkingFactory.cs:194)
Niantic.ARDK.VirtualStudio.AR.Networking._MockARNetworkingSessionsMediator.CreateNonLocalSession (System.Guid stageIdentifier) (at Assets/ARDK/VirtualStudio/AR/Networking/_MockARNetworkingSessionsMediator.cs:55)
Niantic.ARDK.VirtualStudio._VirtualStudioSessionsManager.InitializeProfile (Niantic.ARDK.VirtualStudio.MockArdkPlayerProfile playerProfile) (at Assets/ARDK/VirtualStudio/_VirtualStudioSessionsManager.cs:313)
Niantic.ARDK.VirtualStudio._VirtualStudioSessionsManager.InitializeForConfiguration (Niantic.ARDK.VirtualStudio.MockPlayConfiguration playConfiguration) (at Assets/ARDK/VirtualStudio/_VirtualStudioSessionsManager.cs:264)
Niantic.ARDK.VirtualStudio.MockPlayConfiguration._Initialize (Niantic.ARDK.VirtualStudio._IVirtualStudioSessionsManager virtualStudioSessionsManager) (at Assets/ARDK/VirtualStudio/MockPlayConfiguration.cs:100)
Niantic.ARDK.VirtualStudio._MockModeLauncher.EnterPlayMode () (at Assets/ARDK/VirtualStudio/_MockModeLauncher.cs:187)
Niantic.ARDK.VirtualStudio._VirtualStudioLauncher.OnStateChanged (UnityEditor.PlayModeStateChange state) (at Assets/ARDK/VirtualStudio/_VirtualStudioLauncher.cs:126)
UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:438)

It is not an Issue with the Auth Config and shouldn’t be an issue with the virtual studio too, as in another scene of the the project everything runs well. Anybody know how to fix this?

Thanks a lot in advance !

Fixed the issue myself, one of the Mock Players in Virtual Studios (Foo & Bar) did not have “Create Network” enabled for some reason.