본문 바로가기
감각과 판단 Sensing and Judgment

[HoloLens2] Unity Sample App Deployment Error Handling

by eu1jun 2022. 4. 2.

[Do not Follow the process step by step, skim it out first. I warned you.]

[Spoiler alert: there is a much easier way. (link)]

 

Unity version: LTS Release 2020.3.32f1 The seed of calamity
You better use LTS version considering the compatibility and robustness. and there are more to consider..


Added OpenXR/MRTK plugins.
cf. https://docs.microsoft.com/ko-kr/windows/mixed-reality/develop/unity/welcome-to-mr-feature-tool
cf. https://www.youtube.com/watch?v=sM8wbpYVwSA 

 

Build error occured.

Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
 
UnityEditor.BuildPlayerWindow+BuildMethodException: 101 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I renamed the user account with only English (remove Korean or other letters). Update Windows SDK to deal with related errors.

cf. https://github.com/microsoft/MixedRealityToolkit-Unity/issues/3967
cf. https://developer.microsoft.com/ko-kr/windows/downloads/windows-sdk/

 

 

Now build starts. But another error occurs.

BuildFailedException: Failed to build Visual Studio project using arguments 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe "C:\GitLab\UbiComp-Team5\Build\HoloManual.sln" /nologo /maxcpucount /p:Configuration=Release /p:Platform=ARM64 /p:SolutionDir="C:\\GitLab\\UbiComp-Team5\\Build\\" /t:Build /clp:Verbosity=minimal'.
Output:EXEC : error : System.NotSupportedException: Visual Studio 2017 support for ARM64 is not installed. [C:\GitLab\UbiComp-Team5\Build\Il2CppOutputProject\Il2CppOutputProject.vcxproj]
     at Unity.IL2CPP.Building.ToolChains.MsvcVersions.MsvcSystemInstallationBase.ThrowIfArchitectureNotInstalled(Architecture architecture)
     at Unity.IL2CPP.Building.ToolChains.MsvcVersions.MsvcSystemInstallationBase.GetSdkIncludeDirectories(Architecture architecture)+MoveNext()
     at Unity.IL2CPP.Building.ToolChains.MsvcVersions.MsvcInstallation.IsWindowsSDKInstalled(Architecture architecture)
     at Unity.IL2CPP.Building.ToolChains.MsvcVersions.MsvcInstallation.GetReasonCannotBuildCode(Architecture architecture)
     at Unity.IL2CPP.Building.ToolChains.MsvcVersions.MsvcInstallation.GetMsvcVersionRequirementsForBuildingAndReasonItCannotBuild(Version version, Architecture architecture)
     at Unity.IL2CPP.Building.ToolChains.MsvcWinRtToolChain.GetCannotBuildInCurrentEnvironmentErrorMessage()
     at Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment()
     at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
     at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
     at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)

\deploy\netcoreapp3.1\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\\GitLab\\UbiComp-Team5\\Build\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\\GitLab\\UbiComp-Team5\\Build\\build\bin\ARM64\Release\\" -cachedirectory="C:\\GitLab\\UbiComp-Team5\\Build\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\GitLab\UbiComp-Team5\Build\Il2CppOutputProject\\Source"  --incremental-g-c-time-slice=3 --baselib-directory="C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\\Release" --avoid-dynamic-library-copy --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\GitLab\UbiComp-Team5\Build\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe" --compiler-flags="-d2ssa-cfg-jt-"" ����� ����Ǿ����ϴ�(�ڵ�: -1). [C:\GitLab\UbiComp-Team5\Build\Il2CppOutputProject\Il2CppOutputProject.vcxproj]

ApplicationLauncherImpl.RunMSBuild (System.String args, Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:476)
ApplicationLauncherImpl.Build (Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:331)
ApplicationLauncher.BuildAndRunProject (UnityEditor.Modules.BuildLaunchPlayerArgs args, UnityEditor.WSABuildAndRunDeployTarget deployTarget, System.String platform, Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:67)
ApplicationLauncher.BuildAndRun (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:39)
UnityEditor.UWP.BuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:78)
UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at <294703faec74477f8b275446429fba82>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

The second line seems to be the problem. (error : System.NotSupportedException: Visual Studio 2017 support for ARM64 is not installed.) But I was using the visual studio 2019, so it was weird.

 

The related sutff I could find through google was about remote debugger for ARM devices.

cf. https://docs.microsoft.com/ko-kr/visualstudio/install/visual-studio-on-arm-devices?view=vs-2022 

I installed remote debugger visual studio 2019 and 2017. But both did not improve the status.

 

After searching more, I figured out I need to directly designate the platforrm to upgrade the Windows SDK. (so the SDK update was not applied to Universal Windows Platform, which is used for building HoloLens2 App.)

 

 

Now the IL2CPP related error is solved. But another error occured.

BuildFailedException: Deployment failed.
Output:[15:40:26.771] Windows Phone Player Runner started.
[15:40:26.771] Connecting to device.
[15:40:26.807] An error occurred while running: �����̳� ������ 'Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' �Ǵ� ���⿡ ���ӵǾ� �ִ� �����̳� ������ �� �ϳ��� �ε��� �� �����ϴ�. ������ ������ ã�� �� �����ϴ�.
   ��ġ: Microsoft.SmartDevice.Connectivity.DatastoreManager..ctor(DatastoreConfiguration configuration)
   ��ġ: Microsoft.SmartDevice.Connectivity.DatastoreManager.Get(Int32 localeId)
   ��ġ: Microsoft.SmartDevice.Connectivity.Wrapper.ConnectivityWrapper12.GetCurrentPlatform(Int32 localeId)
   ��ġ: WindowsPhonePlayerRunner.Program.GetDevice()
   ��ġ: WindowsPhonePlayerRunner.Program.Run(String appxPath, RunnerFlags runnerFlags, IEnumerable`1 copyFilesTo)
   ��ġ: WindowsPhonePlayerRunner.Program.Main(String[] args)
[15:40:26.807] Exiting Windows Phone Player Runner.

ApplicationLauncherImpl.RunOnPhone (System.String commandLine) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:399)
ApplicationLauncherImpl.Run (Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:357)
ApplicationLauncher.BuildAndRunProject (UnityEditor.Modules.BuildLaunchPlayerArgs args, UnityEditor.WSABuildAndRunDeployTarget deployTarget, System.String platform, Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:71)
ApplicationLauncher.BuildAndRun (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:39)
UnityEditor.UWP.BuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:78)
UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at <294703faec74477f8b275446429fba82>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

This is related to build and run error from unity for Hololens2. 

cf. https://stackoverflow.com/questions/70909896/unable-to-build-and-run-unity-application-on-hololens-2

 

For Build and Run on setting, it the issue is caused by Build and Run on: USB Device setting, this is a known issue and won't fix by Unity. The best practice is, please switch to Local Machine and generate the Visual Studio Project. With the help of Visual Studio, you can deploy to your HoloLens 2 via wireless network or USB cable. See:

According to reply, we need to circumvent the problem by build first in Unity and run separately using Visual Studio. The mentioned links explain well about the setting.

 

So it builds well, after you pair your HoloLens2 with your desktop with pin. But it prompts another error message..!!

It says Unable to debug. Operation not supported. Unknown error: 0x80070057.

Now I'm feeling like I was on the way becoming a Buddha.

Fortunately, there was a guy who encountered the same problem.

cf. https://docs.microsoft.com/en-us/answers/questions/503518/unity-app-not-properly-deploying-to-the-hololens-2.html

Don't know the exact reason but after I renamed the package as suggested in the upper link, the debug error is gone.

 

 

It does complete the build phase now. But after being deployed to the HoloLens, it shows the loading phase infinitely. I tried Master (version of release) and disabled the Graphic jobs as suggested in this link's note to evade dealing with the debugger.

 

But it caused another error..

Error HRESULT E_FAIL has been returned from a call to a COM component VS2012 when debugging

DEP6953: Failed to launch remote debugger with the following error: 'Command failed: 0x80270254'.

 

I somehow hope to deal with the error directly by installing the mobile development toolkit and setting build and run target to Local Machine as previously mentioned. But it didn't work and returned differnt errors..

 

Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\ARM64\link.exe /out:"C:\GitLab\UbiCompTeam5\Build\build\obj\il2cppOutputProject\ARM64\Release\linkresult_F38C276D70487C4D3B7034E81DC475FE\GameAssembly.dll" /ignore:4206 /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /DLL /IGNORE:4104 /NODEFAULTLIB:uuid.lib "Shcore.lib" "WindowsApp.lib" "Crypt32.lib" "Iphlpapi.lib" "C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Release\baselib.dll.lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\ARM64\store" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22000.0\um\arm64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22000.0\ucrt\arm64" /APPCONTAINER /SUBSYSTEM:WINDOWS /NODEFAULTLIB:ole32.lib /NODEFAULTLIB:kernel32.lib @"C:\Users\user\AppData\Local\Temp\tmpCD9C.tmp"	Il2CppOutputProject	C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\EXEC	1	
LNK1136	������ �߸��Ǿ��ų� �ջ�Ǿ����ϴ�.	Il2CppOutputProject	C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\9046E6B400142C09E6B5B3CB82C95744.obj	1	

MSB3073	""C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\\IL2CPP\build\deploy\netcoreapp3.1\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\GitLab\UbiCompTeam5\Build\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\GitLab\UbiCompTeam5\Build\\build\bin\ARM64\Release\\" -cachedirectory="C:\GitLab\UbiCompTeam5\Build\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\\Source"  --incremental-g-c-time-slice=3 --baselib-directory="C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Release" --avoid-dynamic-library-copy --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe" --compiler-flags="-d2ssa-cfg-jt-"" 명령이 종료되었습니다(코드: 4).	Il2CppOutputProject	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets	46	
LNK1181	'C:\GitLab\UbiCompTeam5\Build\build\bin\ARM64\Release\GameAssembly.lib' 입력 파일을 열 수 없습니다.	HoloManual	C:\GitLab\UbiCompTeam5\Build\HoloManual\LINK	1	

>EXEC : error : Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\ARM64\link.exe /out:"C:\GitLab\UbiCompTeam5\Build\build\obj\il2cppOutputProject\ARM64\Release\linkresult_F38C276D70487C4D3B7034E81DC475FE\GameAssembly.dll" /ignore:4206 /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /DLL /IGNORE:4104 /NODEFAULTLIB:uuid.lib "Shcore.lib" "WindowsApp.lib" "Crypt32.lib" "Iphlpapi.lib" "C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Release\baselib.dll.lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\ARM64\store" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22000.0\um\arm64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22000.0\ucrt\arm64" /APPCONTAINER /SUBSYSTEM:WINDOWS /NODEFAULTLIB:ole32.lib /NODEFAULTLIB:kernel32.lib @"C:\Users\user\AppData\Local\Temp\tmpCD9C.tmp"
1>
1>9046E6B400142C09E6B5B3CB82C95744.obj : fatal error LNK1136: ������ �߸��Ǿ��ų� �ջ�Ǿ����ϴ�.
1>
1>   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
1>   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
1>   at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
1>   at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: ""C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\\IL2CPP\build\deploy\netcoreapp3.1\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\GitLab\UbiCompTeam5\Build\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\GitLab\UbiCompTeam5\Build\\build\bin\ARM64\Release\\" -cachedirectory="C:\GitLab\UbiCompTeam5\Build\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\\Source"  --incremental-g-c-time-slice=3 --baselib-directory="C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Release" --avoid-dynamic-library-copy --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\GitLab\UbiCompTeam5\Build\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe" --compiler-flags="-d2ssa-cfg-jt-"" 명령이 종료되었습니다(코드: 4).
1>"Il2CppOutputProject.vcxproj" 프로젝트를 빌드했습니다. - 실패
2>------ 빌드 시작: 프로젝트: HoloManual, 구성: Release ARM64 ------
2>pch.cpp
2>App.cpp
2>Main.cpp
2>UnityGenerated.cpp
2>LINK : fatal error LNK1181: 'C:\GitLab\UbiCompTeam5\Build\build\bin\ARM64\Release\GameAssembly.lib' 입력 파일을 열 수 없습니다.
2>"HoloManual.vcxproj" 프로젝트를 빌드했습니다. - 실패
========== 빌드: 성공 0, 실패 2, 최신 0, 생략 0 ==========
========== 배포: 성공 0, 실패 0, 생략 0 ==========

Now the build was not working..

I adjusted the Minimum Platform Version and checked the Development Build.

DEP6957: 유니버설 인증을 사용하여 '127.0.0.1' 디바이스에 연결하지 못했습니다. 프로젝트 디버그 설정에서 올바른 원격 인증 모드가 지정되었는지 확인하세요. COMException - 대상 컴퓨터에서 연결을 거부했으므로 연결하지 못했습니다. (예외가 발생한 HRESULT: 0x8007274D) [0x8007274D]	HoloManual
(DEP6957: Failed to connect to device '127.0.0.1' using Universal Authentication.)

Another error appeared. (https://github.com/Microsoft/Xaml-Controls-Gallery/issues/80)

 

I tried using Remote Computer (using Wifi) other than Device (using USB). But during the deployment the device is lost. 

DEP6957: 유니버설 인증을 사용하여 'x.x.x.x' 디바이스에 연결하지 못했습니다. 프로젝트 디버그 설정에서 올바른 원격 인증 모드가 지정되었는지 확인하세요. COMException - 연결된 구성원으로부터 응답이 없어 연결하지 못했거나, 호스트로부터 응답이 없어 연결이 끊어졌습니다. (예외가 발생한 HRESULT: 0x8007274C) [0x8007274C]	HoloManual
(DEP6957: Failed to connect to device 'x.x.x.x' using Universal Authentication.)

And the same error occurred.

 

After I re-pair the desktop and the HoloLens. I tried again using Device (USB).

But it showed different errors.

DEP6100: 단계 '30f105c9-681e-420b-a277-7c086ead8a4e' 디바이스에 연결하는 중입니다.'을(를) 부트스트랩하는 동안 예기치 않은 다음 오류가 발생했습니다. OperationCanceledException - 작업이 취소되었습니다. [0x8013153B]	HoloManual			
(DEP6100 : The following unexpected error occurred during bootstrapping stage)
DEP6955: 60'초 후 '127.0.0.1' 디바이스에 연결하는 동안 시간이 초과되었습니다.	HoloManual
(DEP6955: Timed out after 60 seconds trying to connect the device.)

It seems the first error occurred because HoloLens got into the sleep mode.

But the second error keeps occurring. So I tried different (previous) build type again.

 

Trying same things again and again,,,

It failed with the same message of DEP6955: timed out.

I cleaned the pairing between desktop and HoloLens again and restarted the HoloLens and re-paired.

I built the sample app again and tried with different USB port (which is not USB3.0) and different USB connector.

 

Now it finishes the build and deployment again! But it seems that I'm stuck in infinite loading phase again..

It came to my mind that it might be the problem of application not the HoloLens or compiling process. 

So I installed the HoloLens 2 Emulator to check but it took longer than I expected.

 

And Hyper-V related error occured.

I enabled the Windows Hypervisor Platform, but it didn't work. So I tried enabling Hyper-V (in Korean, about enabling Hyper-V at Window-11 Home.)

So I enabled the Hyper-V. And the installation of emulator resumed. Mercifully, it was much faster than the first 35% of the process..!

 

I executed the sample application on the HoloLens2 emulator!

The Infinite Loading Phase.. Screentshot of the emulator..

I figured out that it was the application itself, that led to the infinite loading phase..!!!

What a twist..

Differnt sample app, and the same infinite loading...

I tried different sample app. But It is stuck with the loading phase too.

I suspected the SDK version is related. I tried building the app with the target SDK version of 10.0.18362.0.

While I was downloading the 18362 emulator, I built a sample app with 18362 SDK, tried directly with the HoloLens2, and got the below errors.

DEP6953: Failed to launch remote debugger
DEP0600: Failed to deploy through ne deployment pipeline
Error HRESULT E_FAIL has been returned from a call to a COM component

 

After these many trials, I figured out that I may need to consider the Windows SDK version of the HoloLens2. And I figured out that it's 19041 version, and adjusted the target SDK of the app to 19041 and re-tried. But it didn't work,  and showed the below error.

DEP6955: 60'초 후 '127.0.0.1' 디바이스에 연결하는 동안 시간이 초과되었습니다.	HoloManual
(DEP6955: Timed out after 60 seconds trying to connect the device.)

And then I saw that the minimum version of SDK should be 10.0.10240.0 from this link, and then tried adjusting the minimum SDK. But it didn't work. It showed below errors.

DEP0600: 배포가 실패했습니다. 새 배포 파이프라인을 통해 배포하지 못했습니다.	HoloManual			
(DEP0600: Failed to deploy through ne deployment pipeline)
OperationFailedException: COM 구성 요소 호출에서 HRESULT E_FAIL 오류가 반환되었습니다.	HoloManual
(Error HRESULT E_FAIL has been returned from a call to a COM component)

And I tried setting the target SDK to 'the lateset SDK' and setting the minimum SDK as 10240.

It showed the same message as the 19041.

DEP6955: 60'초 후 '127.0.0.1' 디바이스에 연결하는 동안 시간이 초과되었습니다.	HoloManual
(DEP6955: Timed out after 60 seconds trying to connect the device.)

Now I feel stuck again.. And this issue seems to be related.

Because the guy said he got the problem when he use the USB, I try Remote deployment again..

 

And I got this message again..

DEP6957: 유니버설 인증을 사용하여 'x.x.x.x' 디바이스에 연결하지 못했습니다. 프로젝트 디버그 설정에서 올바른 원격 인증 모드가 지정되었는지 확인하세요. COMException - 연결된 구성원으로부터 응답이 없어 연결하지 못했거나, 호스트로부터 응답이 없어 연결이 끊어졌습니다. (예외가 발생한 HRESULT: 0x8007274C) [0x8007274C]	HoloManual
(DEP6957: Failed to connect to device 'x.x.x.x' using Universal Authentication.)

I tried both the local and global IP, it didn't work. And it seems there are no clear approaches

But I saw a reply that one succeeded deploying after uninstalling the previous application, and tried and checked deployment is working, but it's stuck in the loading phase.

And I adjusted the target SDK into 19041 again. It again showed the DEP6955.

DEP6955: 60'초 후 '127.0.0.1' 디바이스에 연결하는 동안 시간이 초과되었습니다.	HoloManual
(DEP6955: Timed out after 60 seconds trying to connect the device.)

I set the build configuration as mentioned in the tutorial.

I tried different sample app (Near Menu Examples) using emulator. But it showed strange errors related to 'throw' and ended (SDK 19041). And in 20348, it showed the infinite loading phase.

Yes, again.

Now I felt the MRTK Examples 2.7.3 Demos-HandTracking might be the source of problems,

and tried using other project from github.

 

I followed the steps and it built well but DEP6955 came up again.

DEP6955: 60'초 후 '127.0.0.1' 디바이스에 연결하는 동안 시간이 초과되었습니다.	HoloManual
(DEP6955: Timed out after 60 seconds trying to connect the device.)

I restarted the desktop and HoloLens.

And the application is deployed well to the HoloLens. But it's stuck in the infinite loading phase again.

The application seems to work referring the issue page in the github. So something seems to be wrong with my HoloLens.. Maybe the firmware is quite obsolete? (though it is 19041..)

 

And I found this!!!

Yes there were other guys stuck with the infinite loading.. It seems to be the problem of Unity 2020.3.32f1.

I'll try the other version tomorrow.. Oh my,,