Workaround for System.DllNotFoundException bug

If you’ve been getting an issue like this on Windows/Mac (seems to potentially happen on either):

System.DllNotFoundException: ardk_client_platform assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Niantic.ARDK.Configuration._NativeArdkConfig._NAR_ARDKGlobalConfigHelper_SetContextAwarenessUrl(string)
  at Niantic.ARDK.Configuration._NativeArdkConfig.SetContextAwarenessUrl (System.String url) [0x00000] in /Users/patcat/Code/Lightship/Meri Project/Assets/ARDK/Configuration/_NativeArdkConfig.cs:51 
  at Niantic.ARDK.Configuration.ArdkGlobalConfig.SetContextAwarenessUrl (System.String url) [0x00000] in /Users/patcat/Code/Lightship/Meri Project/Assets/ARDK/Configuration/ArdkGlobalConfig.cs:67 
  at Niantic.ARDK.AR.Configuration._ARConfigurationValidator.SetMissingValues (Niantic.ARDK.AR.Configuration.IARConfiguration config) [0x00072] in /Users/patcat/Code/Lightship/Meri Project/Assets/ARDK/AR/Configuration/_ARConfigurationValidator.cs:187 

Try the following:

  1. Open up Assets/ARDK/Configuration/ArdkGlobalConfig.cs
  2. Change line 39 from
    impl = new _NativeArdkConfig();
    impl = new _SerializeableArdkConfig();
  3. Save it and try playing the scene again!

It’s not a fool proof solution, I’ve no idea whether it might break something but seems like a better option than not being able to test in the Unity editor for now :slight_smile:

It has seemed to work for a few people out there and so I hope it also helps you!


Most excellent, Patrick, thanks. There is an open request with engineering about the issue, and I have linked this information and post to it. We look forward to providing an official fix as soon as possible, so thank you again for providing a potential workaround.

1 Like

Thank you this worked for me also. I had to remove two calls to “_NativeArdkConfig()” with “_SerializeableArdkConfig()” line 35, and 39

1 Like

Looks like it is being caused by the config validator that is trying to use a blank string for setting the context url? No Idea what the attended outcome of using a black string was suppose to do. but it causes this error.

HI @Patrick_Catanzariti, would you happen to know if the bug that this workaround addresses is still present in ARDK 1.2.0?

I’m asking because it’s not clear from this thread where in ARDK the bug occurs, or what the steps to reproduce the bug are. If you (or anyone reading this post) has any information on where the bug occurs, or the steps to reproduce it, please let us know.

We’re actively working on adding better support for Windows and M1 Mac users, so any information that can be provided would be greatly appreciated.

Thank you!

Hi @David_Quevedo - it was happening within Anthony’s Beginner’s Workshop for Meshing in February, which I believe followed similar steps to Intermediate Alternative Meshing in Niantic Lightship - YouTube but started with the Meshing example within the ARDK Examples.

The best way to reproduce is to run the Meshing example in ARDK Examples > Context Awareness > Meshing. It happens when you run the Unity Play mode and hit “Run AR”. The version I’d used when coming across this was v1.1.0.

But… I just took a bit of time tonight to run through the project steps with the newer version of ARDK (v1.2.0) and it works without the workaround!

So yep, at least for that particular way of triggering it, it seems to work on my M1 Mac. I haven’t been able to test on Windows yet though.

Nice work Niantic team!


Hi @Patrick_Catanzariti, thank you so much for the detailed update! We’ll get started on testing this locally.