Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy hololens app via Unity (Build Window) #10390

Closed
polar-kev opened this issue Dec 21, 2021 · 3 comments
Closed

Unable to deploy hololens app via Unity (Build Window) #10390

polar-kev opened this issue Dec 21, 2021 · 3 comments
Labels
Bug Build / Tools Issues related to build and tools. Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on

Comments

@polar-kev
Copy link
Contributor

Originally posted here by Lorans, https://docs.microsoft.com/en-us/answers/questions/670446/unable-to-deply-hololens-app-via-unity.html

I am using MRTK 2.7.2 and unity 2020.3.16f1.
I used the MRTJK Feature tool to import the MRTK package and configure the project.

I followed the project configurations in here (https://docs.microsoft.com/en-us/learn/modules/learn-mrtk-tutorials/1-5-exercise-configure-resources) and I build a big project but I couldn't deploy it using Unity "Build and Run on Remote Device". I tried to build the app using VS, it deployed but I was seeing the spatial awareness mesh and the app was pretty leggy.

I decided to start a new project following the same project setup instructions and I added only one cub. I tried to build and run the app from Unity but it didn't work either. It goes through the entire process then it gets stuck at "running" for one min then I get the following errors;

BuildFailedException: Deployment failed.
Output:Starting Appx installation...
Attempting to query installed packages matching app
Successfully retrieved installed packages matching app from the device
Copying: SAware_1.0.0.0_ARM64.appx
Failed to install SAware_1.0.0.0_ARM64.appx: Copying: SAware_1.0.0.0_ARM64.appx
Installation of Appx failed!
Installation failed in phase Idle - last status: Failed to install SAware_1.0.0.0_ARM64.appx: Copying: SAware_1.0.0.0_ARM64.appx
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at DevicePortalTool.AppOperation.ExecuteInstallAppx(ParameterHelper parameters, String appxFile, String certificate)
at DevicePortalTool.AppOperation.ExecuteInstallOperation(ParameterHelper parameters)
at DevicePortalTool.AppOperation.ExecuteOperationInternal(Operation op, ParameterHelper parameters)

ExitCode: -1 (OperationFailed)

ApplicationLauncherImpl.RunOnDevicePortalDevice (System.String appxPath, System.String playerPackage) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:440)
ApplicationLauncherImpl.Run (Utility+VisualStudio vs) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:360)
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 :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 405 seconds (404736 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in :0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

MRTK 2.7.2
Unity 2020.3.16f1

@polar-kev polar-kev added Build / Tools Issues related to build and tools. Bug labels Dec 21, 2021
@jelmer3000
Copy link

We never run from Unity here at my work. Don't know why but that just doesn't work.
About lag/low FPS: debug builds on HL2 are pretty slow. If you switch to release in VS before deployment it should run at "normal" speed.

@melixor
Copy link

melixor commented May 4, 2022

Today i had same problems. I Deployed the app by unity since some hours ago without poblems, but now something is happened.

@AMollis AMollis added this to the MRTK 2.x future milestone Apr 27, 2023
@IssueSyncBot
Copy link
Collaborator

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!

@IssueSyncBot IssueSyncBot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2024
@IssueSyncBot IssueSyncBot added the Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build / Tools Issues related to build and tools. Won't Fix A real bug, but Triage feels that the issue is not impactful enough to spend time on
Projects
None yet
Development

No branches or pull requests

5 participants