Upgrading the SDK. How do you do it?

Hi y’all,

I’m curios the find out if there is any kind of best practices to upgrade the ARDK version, for example from 2.3.2 to 2.5.2. Should I create a new Unity project and import my old files or can I upgrade the SDK in the same project? How do you guys switch to a newer SDK?

Thanks a lot in advance
Tobi

1 Like

For me the upgrades were relatively simple.
Make a branch on version control/git for backups
(Optional)Delete old ARDK folder
Add new package
Test everything and fix any errors
If working commit to git and merge to main

1 Like

So I did that from 2.3.2 to 2.5.2 but I get this error message (no idea what to do) :

System.ArgumentException: Cannot be null or empty.
Parameter name: metadata
at Niantic.ARDK.VirtualStudio.Networking.Mock._MockMultipeerNetworking.Join (System.Byte metadata, System.Byte token, System.Int64 timestamp) [0x0010e] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/VirtualStudio/Networking/_MockMultipeerNetworking.cs:135
at Niantic.ARDK.Extensions.NetworkSessionManager.Connect () [0x00057] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/NetworkSessionManager.cs:242
at Niantic.ARDK.Extensions.NetworkSessionManager.EnableFeaturesImpl () [0x0002e] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/NetworkSessionManager.cs:160
at Niantic.ARDK.Extensions.UnityLifecycleDriver.EnableFeatures () [0x00030] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/UnityLifecycleDriver.cs:170
at Niantic.ARDK.Extensions.ARNetworkingManager.EnableSessionManagers () [0x0000b] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/ARNetworkingManager.cs:179
at Niantic.ARDK.Extensions.ARNetworkingManager.CreateOnARSessionInitialized (Niantic.ARDK.AR.ARSessionEventArgs.AnyARSessionInitializedArgs args) [0x0003b] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/ARNetworkingManager.cs:123
at (wrapper delegate-invoke) Niantic.ARDK.Utilities.ArdkEventHandler`1[Niantic.ARDK.AR.ARSessionEventArgs.AnyARSessionInitializedArgs].invoke_void_TArgs(Niantic.ARDK.AR.ARSessionEventArgs.AnyARSessionInitializedArgs)
at Niantic.ARDK.AR.ARSessionFactory._InvokeSessionInitialized (Niantic.ARDK.AR.IARSession session, System.Boolean isLocal) [0x0002e] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/AR/ARSessionFactory.cs:171
at Niantic.ARDK.AR.ARSessionFactory.Create (Niantic.ARDK.RuntimeEnvironment env, System.Guid stageIdentifier) [0x00095] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/AR/ARSessionFactory.cs:74
at Niantic.ARDK.AR.ARSessionFactory.Create (Niantic.ARDK.RuntimeEnvironment env, System.Guid stageIdentifier) [0x00003] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/AR/ARSessionFactory.cs:43
at Niantic.ARDK.Extensions.ARSessionManager.Create () [0x00054] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/ARSessionManager.cs:224
at Niantic.ARDK.Extensions.ARSessionManager.CreateAndRun () [0x00000] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/ARSessionManager.cs:251
at Niantic.ARDK.Extensions.ARSessionManager+<>c__DisplayClass31_0.b__0 () [0x0001b] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Extensions/ARSessionManager.cs:159
at Niantic.ARDK.Utilities._CallbackQueue.ConsumeQueue () [0x00042] in /Applications/Unity/AR_SandBox_AliveStudios_1.3_URP/AR_SandBox_AliveStudios_1.3_URP/Assets/ARDK/Utilities/_CallbackQueue.cs:70 from context:
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:_Exception (System.Exception,object) (at Assets/ARDK/Utilities/Logging/ARLog.cs:226)
Niantic.ARDK.Utilities._CallbackQueue:ConsumeQueue () (at Assets/ARDK/Utilities/_CallbackQueue.cs:75)
Niantic.ARDK.Utilities._CallbackQueue:Update () (at Assets/ARDK/Utilities/_CallbackQueue.cs:116)

1 Like

It seems like a script is missing… but reimporting does not work

1 Like

Did you check if your auth key is still valid and put in?
Did you check the setup guide for the latest version?

1 Like

Yeah I double checked that

1 Like

I solved the issue.
TLDR: There were two AR Session Managers in the scene.

2 Likes