Error: _nativeHandle is not null, _InitializeNativeLibraries is called twice

  • Issue category : ARDK
  • Device type & OS version: N/A
  • Host machine & OS version: Apple M1 Pro on Ventura 13.1
  • Issue Environment : Unity
  • Xcode version: 14.2
  • ARDK version: 2.4.2
  • Unity version: Unity Hub 3.4.1, Editor Version 2021.3.19f1

Bug reproduction steps:

#Niantic.ARDK.Internals.StartupSystems#: _nativeHandle is not null, _InitializeNativeLibraries is called twice
UnityEngine.Debug:LogError (object)
Niantic.ARDK.Utilities.Logging.UnityARLogHandler:Error (string) (at Assets/ARDK/Utilities/Logging/LogHandler/UnityARLogHandler.cs:41)
Niantic.ARDK.Utilities.Logging.ARLog:_Error (string) (at Assets/ARDK/Utilities/Logging/ARLog.cs:198)
Niantic.ARDK.Internals.StartupSystems:_InitializeNativeLibraries () (at Assets/ARDK/Internals/StartupSystems.cs:113)
Niantic.ARDK.Internals.StartupSystems:_StandardStartup () (at Assets/ARDK/Internals/StartupSystems.cs:86)
Niantic.ARDK.Internals.StartupSystems:Startup () (at Assets/ARDK/Internals/StartupSystems.cs:70)

Downgrading to ARDK v2.3.2 solves this issue.

Hi Lewis, It looks like other users have reported this issue. I will keep you looped in when our engineers are able to track this down. Please keep an eye on the forum and watch here for more information

Same here - using Unity 2020.3.40 - Its strange as the app exported fine yesterday from the Example from the Hub (Object Placement)

Just did a build through xcode and it installed and worked on my iphone fine! Should we just ignore it??

Hi Lewis, are you still experiencing this issue? We’ve had users report that it has been cleared up. One of them tried this and said it helped:
– You can deploy it by removing the call to _InitializeNativeLibraries(); (around line 59) in the !REQUIRE_MANUAL_STARTUP method.
Let me know if this works for you

Hi Lewis, A fix for this issue is coming in 2.4.3 and 2.5. Please keep an eye on release notes when these updates come out