Remote Machine IP disappears when entering Play Mode (Unity/Hololens) - unity3d

I'm working with an XR Unity project (2019.4.26f1) and I'm trying to deploy it on the HoloLens 2. I've managed to build the project and to run it in the HL from Visual Studio by cable but I need to be able to see the app in the HL when I enter on the Play Mode in Unity.
I've followed some tutorials like this one and I can do every step but when I get to the step of writing the IP in the Windows Mixed Reality window, a problem appears. When I hit play to go on Play mode, the IP disappears, and I receive an error because the Remote Machine Address is not set. Why is this happening?
I have something like this, with the IP of the HoloLens in the field, the HL are ON and with the HoloRemoting app running. I can access this IP by browser and see that the status is "Connected" and see Live footage of the Lens camera.
However, when I hit "Play", the IP disappears and I get this error.
Atempting to initiate remoting connection with no valid machine name
set. UnityEditor.EditorApplication:Internal_PlayModeStateChanged
(UnityEditor.PlayModeStateChange)

Due to potential compatibility issues, it is highly recommended to upgrade your Unity version to 2020.3.31f1 with the latest Mixed Reality OpenXR plugin. You may refer to the document on Choosing a Unity version and XR plugin - Mixed Reality | Microsoft Docs.

Related

Holographic Remoting (Hololens 2) connection problem in both Unity and Unreal : TransportConnectionFailed

I'm new in hololens 2 developing and trying to use Holographic Remoting.
Unity 2019 LTS
MRTK 2.5.3
Unreal 4.26
Hololens 2
Win 10
VS 2019
In Unity : I follow a popular tutorial,
On HoloLens, go to the Microsoft Store and install the Holographic Remoting Player application.
On HoloLens, start the Holographic Remoting Player application.
In Unity, click the "Windows" menu and select "XR->Holographic Emulation".
Set the simulation mode to the remote device.
For remote computers, please enter the IP address of HOLOLENS.
Click "Connect". You should see the connection status change to "Connected", and you should see the screen appear blank in HoloLens.
Click the "Play" button to start the play mode and experience the application on HoloLens.
What I met:
Setting in Unity
Setting in Unity
When I start to "Connect", Error there:
Disconnected with error TransportConnectionFailed
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
In Unreal I follow: https://docs.unrealengine.com/zh-CN/SharingAndReleasing/XRDevelopment/AR/HoloLens/QuickStartStreaming/index.html
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/unreal/tutorials/unreal-uxt-ch6
Setting in Unreal
Setting in Unreal
Similiar error:
LogTemp: Editor connecting to remote HoloLens2: 192.168.19.57
LogWmrHmd: WMRInterop: ConnectToRemoteHoloLens trying to connect to HoloLens2 192.168.19.57
LogWmrHmd: WMRInterop: RemotingDisconnectedEvent: Reason: 12 TransportConnectionFailed
LogHoloLensAR: Warning: HoloLens AR session disconnected from peer
I can connect the device in device portal, and in the Unreal device manager I can also connect my hololens.
device portal
Unreal device manager
Anyone meet this problem?
Could you check that is there any network management software (such as anti-virus software, Firewall, VPN, etc.) is running on your PC? Because we have solved same problems of another customer, and the reason is that he installed VPN software on the PC, which caused UDP port to be blocked. If you still see the same behavior after shutting down the network management software, please open a support ticket through this link: http://aka.ms/hololenssupport
I still didn't find a solution with this configuration (thank you Hernando, but it's not a VPN problem).
However, after I used :
unity2019LTS-XRSDK-MRTK2.4.0-DefaultXRSDKConfigurationProfile
All the things work well (whether VPN is on or not).

Unable to stream from Unity to XR Remote app on Android

I am not able to make XR Remote stream data from Unity to the app. I downloaded 8thWallXR-Demo project for Unity and did all the necessary stuff in tutorial, but it still doesn't work. I also followed troubleshooting instructions (restarting the ADB), but nothing worked.
When I start the app, I can see both USB and the name of my PC (Wi-Fi connection). If I select USB, it shows "Waiting for USB" infinitely, and if I choose Wi-Fi connection, the title changes to "-529". I guess they are connected somehow, but they cannot establish streaming connection.
The weird thing about this is it works properly on my second computer at work. So I really don't know what could cause the trouble.
I use Windows. Both XR tools and phone app are updated.
I solved the problem. It is most probably a Unity bug. I opened Edit -> Preferences -> External Tools. In "Android" section, there are five checkbox options.
I unchecked the "Android NDK Installed with Unity (recommended)" checkbox. After that, I clicked Browse button, which automatically filled in path to NDK.
This made XR Remote stream work properly. However the weirdest part about this is it actually works even if I check that checkbox again.

"Error DEP6957 Failed to connect to device using Universal Authentication" when deploying Unity app to Hololens emulator

I've been working in a Unity app with Hololens emulator in Visual Studio 2017 in Windows Pro, and it was working great until last night where I started to get the following issue every time that I try to deploy my application into the Hololens emulator:
Error DEP6957 : Failed to connect to device '[device_ip]' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings.
I've tried to do the following things without success:
Clean/rebuild solution
Checked 'uninstall/install' checkbox in the UWP project settings
Deleted Hololens virtual machine
Uncheck/check Hyper-v feature (and restart PC after each try)
Restarted computer
No luck. Sometimes, I am able to make it work, but after 30 seconds to 1 minute, the hololens emulator gets frozen and then it closes itself; again, this was working fine until last night, and I have not installed anything different, unless an automatic windows update did something. This happens with all the applications, and they run just fine in the Unity player.
I would appreciate your help on this, I just don't think the only solution is to uninstall/install Visual studio and all its components, it makes no sense, since everything was ok.
Thank you.
UPDATE
I've just noticed that if I connect the laptop to the internet by using an ethernet cable, it works, it only fails in WIFI, have you seen that before? I also have another UWP that I deploy remotely to a raspberry and it also works only with ethernet, but both of them were used to work in wifi? any idea?

Unable to deploy on HoloLens

My setup
HoloLens
Windows 10 October 2018 Update (10.0.17763.134)
Desktop
Windows 10 Enterprise
Visual Studio Community 2017 Version
Unity 2018.2.19f1 (Latest 7th December 2018 Update)
The Problem
I am unable to deploy any application to the HoloLens, but able to deploy it on hololens-emulator. I'm attempting with the Origami application exported from Unity as in the tutorial. I'm able to pair with the HoloLens easily and I have developer mode on. Visual Studio also does auto-detect the device as a remote machine. But when I attempt to deploy it, I always get the same "DEP0100" error, that the device is not in developer mode though the device is already in a developer mode. I'm at a loss for what else to try, or what setting I've missed. I've reset the HoloLens several times and reinstalled Visual Studio only to get the same thing.
I have already tried the solution mentioned here Unable to deploy HoloLens application but it didn't work for me.
It is not clear what you got. But I have couple ideas:
You connected to HL as Remote Machine, but HL is Device.
You built an appx as x64, but HL is x86.
You didn't install a proper runtime, debug or release.
You use older SDK than HL platform version.
You minimal target platform is higher then HL platform version.
Maybe something else. You need to investigate the Hololens logs. Open "Windows Device Portal"/System/Logging.
Then you need to select some providers with severity by choosing them in box and clicking "Enable". I usually begin from "Microsoft-Windows-WinRT-Error" ETW provider.
DO NOT CLOSE THE LOGGING PAGE!!!!!
Start the debugger with app, see the error and go to Logging page. Try to find out the root of issue.

Error DEP6200: Bootstrapping failed. Device cannot be found. SmartDeviceException - Deployment failed because no device was detected

I have seen few posts here about same error but none worked for me.
I am trying to deploy UWP from VS2017 from one machine to a Surface machine that is USB connected to the machine running VS2017.
Both machines are running Windows 10 Pro, 17134 (1803) April Update.
Surface machine has enabled Developer Mode in "For Developers" settings and Developer Mode package is installed on it and Remote tooling for desktop is enabled. It is also USB connected to the machine running VS2017 Enterprise 15.7.5
According to MS documentation, that is all what is needed to deploy to device. However, deploy fails with error
Severity Code Description Project File Line Suppression State
Error DEP6200: Bootstrapping failed. Device cannot be found. SmartDeviceException - Deployment failed because no device was detected. Make sure a device is connected and powered on. [0x80131500] MyApp.App.UWP
I was unable to deploy either to device or to use remote debugging.
Deploying to device was failing with the same error message as above. Interestingly, even if device (Surface in this case) is not USB connected to my dev machine at all, I get same error which basically makes sense. But I dont know why I get that same error when I connect Surface tablet to my dev machine.
Deploying for remote debugging did not work since my Surface tablet is not connected to same LAN as my dev machine.
So, for my testing purposes, I deployed by using USB stick
Right click on UWP project, choose Store, then choose Create App
Packages ....
In Create App Packages window, select "I want to create packages for
sideloading"
Click Create
Leave Local Machine as target device for validation
click on Launch Windows App Certification Kit button to launch it
and go through steps until complete
Once package is completed, I copied entire folder onto a flash drive
and moved the content of the folder to my Surface tablet
Then on Surface tablet, right click on the Add-AppDevPackage.ps1
file and choose Run This PowerShell
this will start deployment and deploy the app