VPS working on editor but not on Build nor Remote

Include the following details (edit as applicable):

  • Issue category: VPS
  • Device type & OS version: Android 12
  • Host machine & OS version: Windows
  • Issue Environment: Unity Remote / On Device
  • Xcode version: -
  • ARDK version: 2.3.1
  • Unity version: 2021.3.2f1

Description of the issue:
I have been building a Wayspot Anchor Manager based on the WayspotAnchorExampleManager found in the Wayspot Template. I have copied and modified the script appropriately up to being able to Localize the Wayspot and display it on a UI text element on the Unity Editor. The problem starts when I deploy it to my phone, my text element jumps directly from “Initializing Session”, to “Failed”. If I change the Run Environment to Live Device, my Status gets stuck at “Session Initialized” and get the following error:

System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Niantic.ARDK.LocationService.LocationServiceFactory.Create (Niantic.ARDK.RuntimeEnvironment env) [0x00029]

I tried with Remote Mode and there the problem seems to be that the LocationServiceFactory.Create(_arSession.RuntimeEnvironment) method doesn’t return a location service. I thought that this was my problem until I tried the Remote Mode on the VPS Template and got the exact same error. The template does work on my phone.
My project also has AR Plane Management and the Android Permissions are set to Camera and Fine Location.
Am I missing some prefab or component that will allow me to localize Wayspots on my device?

Thank you in advance!

Hello @Alvaro_Pazmino,

If the scene has been configured correctly, you should see the status move relatively quickly to “Localizing” while the ARSessionManager’s Runtime Environment is set to Default. Are you also encountering issues when Runtime Environment is set to Default and you deploy to your device?

Additionally, there is a second sample for this located in our Lightship Hub assets, available for download in the Lightship portal here. You may want to check out the WayspotAnchorTemplateController.cs script that gets used in the WayspotAnchors scene within Lightship Hub to compare to your existing modified scripts to ensure everything is being configured properly.

i got a same problem