Authentication error on LowLevelNetworking Scene

Description:

I have found a little problem regarding the authentication process while getting started with ARDK. The problem happens while running LowLevelNetworking scene included in the samples package. I’ve followed the Authentication guide (Niantic AR Development Kit (ARDK): Authentication) step by step, and the problem seems to happen in step number 4.

  • Issue category: ARDK Documentation / Unity Example Package
  • Device type & OS version: unity Editor
  • Host machine & OS version: Windows
  • Issue Environment : Unity Mock / Dev Portal
  • Xcode version: -
  • ARDK version: 1.0.1
  • Unity version: 2019.4.27 (LTS)

Bug reproduction steps:

Problem:

  • Configure a Unity project with ARSDK and the examples package.
  • Open LowLevelNetworking Scene.
  • Find the ExampleManager GameObject and set the Runtime Environment field of the NetworkSessionManager component to Live Device (or Remote).
  • Enter Play Mode (unity Editor).
  • Hit the Init button → The following error message will appear on the console:

Exception: Attempting to use networking without setting up your API key or Authentication URL. Set those up through the ARDKAuthRegistrar, or at runtime on ServerConfiguration before using networking!

Solution: Set the Runtime Environment field as Default or Mock.

I guess the problem lies in the documentation and not in the development side, as I find this behaviour logical.

Hi Daniel,

It’s likely that you have two versions of the ArdkAuthConfig asset present in your project. This can happen if you follow the tutorial that you’ve linked in your post while also importing the ardk-examples Unity package into your project. This is because there is a copy of this asset already included in ardk-examples.

To fix this, delete one of the ArdkAuthConfig assets from the project, and then ensure that your API key has been added to the remaining one. For your reference, the asset included in the ardk-examples Unity package is located at Assets/ARDKExamples/Resources/ARDK/ArdkAuthConfig.asset.

One more thing to keep in mind is to avoid pasting any whitespace characters into the API Key field of the ArdkAuthConfig asset, since this will also cause an authentication failure.

Hope this helps!

Hi David,

Thanks for your quick response. I have checked the project and there is only one ArdkAuthConfig. I am using the one that comes with the samples package and that you specify. I have also checked that the key is copied correctly and without whitepaces.

As I mentioned, I am able to run the scene and complete all the steps in the guide by selecting ‘Mock’ in the ‘NetworkSessionManager’ instead of ‘Live Device’. I have been able to run other scenes as well (tested on an Android device).

This is not a blocking problem and I have managed to find this solution I pose by tweaking the options in the manager component. That is why I suggested this may be a documentation problem and not a real bug in the SDK.

Once again, thank you for your response!

Hi Daniel,

No problem at all, and thank you for the bug report! We will follow up on this internally.

Cheers!

Ran into the same issue as the OP. Solution was to change the Runtime Environment from “Live Device” to Mock.

Documentation is definitely incorrect/incomplete for: Niantic AR Development Kit (ARDK): Authentication

Hi @Eric_Ha , would you be able to share your OS information and Unity version? I did some checking, and I’m seeing different behavior on M1 Mac vs Intel. On the Intel Mac it’s working as described in documentation. But on the M1 Mac, I’m seeing the same behavior that you are reporting.

Intel MBP (16-inch, 2019)
Big Sur (11.6.4)
Unity 2020.3,26f1 (Personal)
ARDK1.1.0 and even tried on ARDK1.2.0

1 Like

Thank you for the information. We’ll dig into this a bit more, and will either correct the documentation, or see to it that the behavior is fixed. Apologies for the late reply, and thanks again!

Hi @David_Quevedo,

Do you happen to have any updates on this report? I also experienced this issue on Windows (Unity version 2020.3.38f1).

As Daniel mentioned, the problem is resolved when Runtime Environment is set to Mock. However, it does not appear that the documentation has been updated to reflect this. Therefore, I’m wondering if there are different steps I should go through to resolve this problem.

Thanks!