1. What happened
The Unity Player crashes in native code after executing HttpClient.GetAsync() in a script. The crash only happens when using UWP, building for ARM64 and running on the Hololens 2. It does not crash when the platform is set to standalone PC or when set to UWP and built and ran on your local machine (eg, x64). It also crashes when the same project is built using Unity 2021.3.16 and 2022.3.0. In the attached project, the script calling HttpClient.GetAsync() is called SignInBehaviour and is triggered by pressing the "Login" button within the game. The project only crashes on ‘Release’ builds. It just gives an error when in the ‘Debug’ build configuration.
2. How can we reproduce it using the example you attached
1. Set the build platform to Universal Windows Platform with the build settings set to target the latest Windows SDK (10.0.22621.0) and the Build Configuration to ‘Release’.
2. Build the project in Unity.
3. Open the built project solution in Visual Studio 2019/2022 that has the Universal Windows Platform workload installed.
4. Build the solution for ARM64 and run it on the Hololens 2.
5. When the player is running, click the "login" button in the centre of the window.
6. Observe the crash.