ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.11k stars 1.28k forks source link

WEBXR broken, SteamVR 2.0.8 #1784

Open csynth opened 1 year ago

csynth commented 1 year ago

WEBXR appears to be broken in release 2.0.8 (and I think other 2.0.x releases?)

Simple test is at https://immersive-web.github.io/webxr-samples/immersive-vr-session.html?usePolyfill=0 ENTER VR button correctly changes to EXIT VR, StreamVR correctly shows app as Google Chrome 119 (or whatever) headset view correctly moves as headset moves BUT headset and 'Display VR View' shows generic scene with 'Google Chrome 119' window instead of correct content.

Similar failure with https://threejs.org/examples/?q=webxr#webxr_xr_ballshooter and other WebXR pages.

Works with SteamVR temp_v1.27.5

Old Vive headset, Windows 10, SteamVR 2.0.8. Does not work on Chrome Version 119.0.6045.106 (Official Build) 64 bit, Chromium Canary Version 121.0.6100.0 (Official Build) canary (64-bit) Edge Version 118.0.2088.76 (Official build) (64-bit)

csynth commented 1 year ago

Non browser based VR is still working correctly.

aleiby commented 1 year ago

I just tested this on version 2.0.10 using Index and Chrome and it worked fine. Make sure SteamVR is set as your OpenXR runtime, then also be sure to refresh the page in Chrome. If you are still having an issue, please pose a SteamVR System Report.

csynth commented 1 year ago

Thank you for checking.

My SteamVR updated to 2.0.10 just now, but symptoms as before. System report attached. Also console log from attempt to enter XR. (as before, XR entered OK, but 'generic' output to headset)

I've used chrome XR runtime both explicitly set to OpenXR, and left to default. Results (as expected) identical. Clearly being correctly identified, as the STEAMVR monitor window correctly identifies any browser as a browser tab opens XR. I've reset all SteamVR settings to default.

SteamEnterXRlog.txt

SteamVR-2023-11-02-AM_08_36_23.txt

csynth commented 1 year ago

A colleague tried and it worked for him (2.0.10). Main difference between his and my setup that we can spot is that he has a Vive Pro and I have an original Vive. I hope to be trying it on another machine with Vive soon.

I've also updated Nvidia drivers and rebooted ... no change.

csynth commented 11 months ago

A complete uninstall of SteamVR, then of Stream, then reinstall of Stream (in a different location) and SteamVR has resolved the issue. Uninstalls and reinstalls of just SteamVR itself, including reboots, didn't seem to be enough. I guess we will never know exactly what stirred it and how it can be avoided for me and others in future. Thanks anyway, Stephen

csynth commented 11 months ago

The issue reappeared and I think I've found the issues; posted here in case it helps anyone else with similar problems. There were two separate issues. .~ 1 ~ It appears SteamVR needs app containers enabled to work properly, certainly to work in a browser. It often automatically prompts for this; but if it somehow does not get them enabled, start SteamVR and run (?? as admin??) "C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\win32\removeusbhelper.exe" enableappcontainers (with appropriate Steam directory of course).

It would help if this were more obvious as an advanced developer setting or whatever .~ 2 ~ Chrome etc seem to use the Vive sensor to see if you are wearing the headset. If it thinks you aren't wearing it, it doesn't show your scene, but the generic 'Chrome 119' message mentioned in my first post. This is very likely to happen while you are trying to debug and get things working; it's pretending to be broken when it isn't.

A finger over the sensor will make it show the scene again; even easier just put a scrap of tape over the sensor when debugging. .~~~ These seem to be a Chromium thing. Firefox worked without the app container, and showed the proper webapp scene.

csynth commented 11 months ago

I have just realized that issue 2 above is resolved by setting SteamVR settings~video~Pause VR when headset is idle = false