aframe icon indicating copy to clipboard operation
aframe copied to clipboard

WebXR not working on Chrome Desktop Windows

Open dmarcos opened this issue 3 years ago • 105 comments

Chrome has switched from vendor specific APIs to OpenXR. Oculus and Valve have shipped experimental runtimes on their respective beta channels. It requires users to opt in. Once the OpenXR implementations ship on the release channels WebXR will work automatically. No changes required on the A-Frame side. Keeping this open as a reference.

dmarcos avatar Oct 22 '20 19:10 dmarcos

@JoeLudwig Is there any ETA for Valve to ship an OpenXR runtime on release channel? Thank you!

dmarcos avatar Oct 22 '20 19:10 dmarcos

OpenXR support in SteamVR is in the release channel now. It's not yet conformant, however. The main limitation is that it only supports one projection layer. Not sure if that matters for WebXR.

We don't have an ETA for when we'll finish up support for multiple projection layers and finalize conformance.

JoeLudwig avatar Oct 22 '20 19:10 JoeLudwig

@JoeLudwig Thanks Joe. Much appreciated

Just gave it a try with the WebXR sample. Something is happening but not fully working. I can click on enter VR, see the Chrome loading image in Steam VR and then the display goes black. Content doesn't present in headset and there are no console errors.

I can see navigator.xr.requestSession('immersive-vr') succeeding and a proper WebGL layer initialized

I'm on SteamVR 1.14.16 and Chrome 86 using an Oculus Rift over Steam VR. Native VR content works as expected. Below a screenshot of the setup:

image

@toji Any step I might be missing or configuration needed in chrome://flags?

dmarcos avatar Oct 22 '20 20:10 dmarcos

Diego, when installing/upgrading SteamVR, did you get a "SteamVR needs to set itself up for App Containers" prompt, and did you grant that permission? I don't know offhand if there's a way to check retroactively if that's set up correctly.

"The requested session requires user activation" may be a red herring, did you set a breakpoint at the requestSession call? The user activation state the app gets from clicking the "Enter VR" button expires after a few seconds (5s I think), and if it's stopped at the breakpoint longer than that, requestSession fails with that error.

There should not be any flags needed for Chrome when using OpenXR with App Container support, but would you be willing to try a newer channel such as Chrome Dev or Canary to see if that behaves differently?

I'll give it a shot on my Windows machine also to compare, it had worked last time I tried but I don't remember which Chrome version that was.

klausw avatar Oct 22 '20 21:10 klausw

Sorry, the The requested session requires user activation error was from a previous test. I hadn't clear the console. Updated the image above to reflect the real state. I see a pose coming in too. Still nothing in headset.

I indeed saw the SteamVR needs to set itself up for App Containers prompt. The test above is done after accepting

dmarcos avatar Oct 22 '20 21:10 dmarcos

What does this show in your settings?

image

JoeLudwig avatar Oct 22 '20 21:10 JoeLudwig

I had everything Off and Current OpenXR Runtime set to Oculus. I switched to SteamVR and get similar results. The browser enters VR mode but doesn't present in headset. I get now Chrome next up prompt in the SteamVR space instead of the Oculus runtime equivalent.

image

Below my settings for reference

image

dmarcos avatar Oct 22 '20 21:10 dmarcos

It's also not working for me. requestSession succeeds, but the session rAF callbacks don't get run, and the headset just shows the home menu.

I tried:

88.0.4300.0 (Official Build) canary (64-bit) (cohort: Clang-64) 87.0.4280.27 (Official Build) beta (64-bit) (cohort: Beta) 86.0.4240.75 (Official Build) (64-bit) (cohort: Stable)

This was generally with no flags: "[...]\Google\Chrome SxS\Application\chrome.exe" --flag-switches-begin --flag-switches-end

I also tried with --disable-features=XRSandbox which didn't seem to make a difference.

This is using SteamVR beta 1.15.4 on Windows 10 OS Version 2004 (Build 19041.572).

klausw avatar Oct 22 '20 22:10 klausw

Thanks @klausw @JoeLudwig for investigating.

@Artyom17 Do you know if there's any ETA for Oculus to ship the OpenXR runtime on the release channel? Thank you!

dmarcos avatar Oct 22 '20 22:10 dmarcos

In case it helps, here are messages from SteamVR Developer / Web Console when I try to start a session in Chrome Beta:

vrserverThu Oct 22 2020 15:08:48.314 - lighthouse: LHR-033AC4CE H: SOB: drop S-1 seeing S-11 (6E2E9096)
vrserverThu Oct 22 2020 15:08:50.195 - StartSceneApplicationTransitionFromProcess( 16280, C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe, system.generated.chrome.exe)
vrserverThu Oct 22 2020 15:08:50.195 - AppInfoManager.ProcessConnected BEGIN 16280 C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe 10 system.generated.chrome.exe
vrserverThu Oct 22 2020 15:08:50.200 - SetApplicationPid appkey=system.generated.chrome.exe pid=16280, external transition
vrserverThu Oct 22 2020 15:08:50.200 - SetApplicationPid: Setting app system.generated.chrome.exe PID to 16280
vrserverThu Oct 22 2020 15:08:50.200 - AppInfoManager.ProcessConnected END
vrserverThu Oct 22 2020 15:08:50.200 - Processing message VRMsg_ChangeAppType from chrome (16280) took 0.00509 seconds
vrserverThu Oct 22 2020 15:08:50.203 - Unable to find input profile for holographic_controller in SetXrInputConfig
vrwebhelper_controllerbindingThu Oct 22 2020 15:08:50.257 - CEF Local Resource Load Error: http://localhost:27062/app/image?app_key=system.generated.chrome.exe&version=1.15.4 -> 404 (Not Found)
vrwebhelper_systemuiThu Oct 22 2020 15:08:52.238 - CEF Local Resource Load Error: http://localhost:27062/dashboard/css/images/appimage_default.png -> 404 (Not Found)

klausw avatar Oct 22 '20 22:10 klausw

Forgot to add earlier, I was testing with a Valve Index headset using the SteamVR OpenXR runtime.

Interestingly, it's now working for me on Chrome stable (86) and Canary (88). (I didn't retest 87.), using the default OpenXR runtime with no Chrome flags.

There seems to be an issue related to the SteamVR library menu (I have Steam Home disabled). When I start SteamVR, it displays the Library panel with recent games and system functions at the bottom. While this panel is open, Chrome can start a WebXR session, but it doesn't receive ongoing animation frame callbacks, and output seems inconsistent - sometimes I see a frozen frame behind the SteamVR Library panel, other times not.

If I use the headset's system button to close the SteamVR Library panel, the WebXR page starts showing, and everything seems to be working normally including the expected rAF callbacks.

Exiting the WebXR page through the browser's "Exit VR" button leaves a frozen frame behind.

klausw avatar Oct 22 '20 23:10 klausw

Does Chrome destroy the OpenXR instance when the ExitVR button is pressed?

AFAIK Oculus shipped their OpenXR support in July.

JoeLudwig avatar Oct 23 '20 01:10 JoeLudwig

We shouldn't be destroying it when the ExitVR button is pressed (at least from 86+); I think we did previously, but we hit some issues with SteamVR only allowing one instance to be created (which is allowable by the spec), so now we only destroy it when either the headset is removed or no open pages have queried for XrSupport.

alcooper91 avatar Oct 23 '20 16:10 alcooper91

"headset is removed" in this case meaning getting unplugged or similar actions that cause the OpenXrDevice to get destroyed. (I was briefly confused thinking this was referring to the headset's proximity sensor, thanks Alex for clarifying.)

klausw avatar Oct 23 '20 17:10 klausw

Thanks everybody for participating. There's more clarity now.

I tried Chrome 86 (Release) and 88 (Canary) on the WebXRS sample with an Oculus Rift and Oculus runtime Version 21.0.0.473.119 (SteamVR is not running)

navigator.xr.isSessionSupported('immersive-vr') returns false. If the Oculus OpenXR runtime has shipped perhaps is not enabled by default?

dmarcos avatar Oct 23 '20 18:10 dmarcos

I asked our engineers working on the OpenXR driver for Oculus Rift and they suspect that it is an issue with setting the active openxr runtime. In your registry what is HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1 set to? It should be C:\Program Files\Oculus\Support\oculus-runtime\oculus_openxr_64.json

cabanier avatar Oct 23 '20 19:10 cabanier

@cabanier Thanks. It's set to C:\Program Files (x86)\Steam\steamapps\common\SteamVR\steamxr_win64.json I switched to C:\Program Files\Oculus\Support\oculus-runtime\oculus_openxr_64.json and I can enter VR but have the same issue as with the SteamVR OpenXR runtime.

navigator.xr.requestSession('immersive-vr') succeeds with the WebXR sample and Chrome 86/88 but no content presented in headset. Display remains black. If I exit VR mode the Oculus Home renders again.

Can anyone at Oculus reproduce as well or is it just me?

dmarcos avatar Oct 23 '20 19:10 dmarcos

I know of one other person that saw a similar issue, where the Oculus headset didn't seem to render. It seemed like a timing issue, as Debug builds worked, but Release builds did not.

alcooper91 avatar Oct 23 '20 19:10 alcooper91

I was told we test with latest Chrome and Chrome Canary.

cabanier avatar Oct 23 '20 19:10 cabanier

@cabanier Thanks. I tested with those too. Chrome (86) and Canary (88) at the moment.

Are users expected to change the Windows registry to make Chrome and WebXR work? If that's the case, what happens if someone uses both SteamVR and Oculus runtime (because they own games on both or have multiple headsets)? Do the they have to edit the registry depending on the runtime used? Is there any mechanism planned to make it transparent to the user and automatic? Sorry for all the questions. I know you might no have the answers now. Just putting them out there.

dmarcos avatar Oct 23 '20 20:10 dmarcos

Are users expected to change the Windows registry to make Chrome and WebXR work?

Yes, this is how it's documented on khronos

If that's the case, what happens if someone uses both SteamVR and Oculus runtime (because they own games on both or have multiple headsets)? Do the they have to edit the registry depending on the runtime used?

It seems that these are questions for the Khronos group. Hopefully there will be a UI so users can make a choice.

cabanier avatar Oct 23 '20 20:10 cabanier

Users will change the registry, but probably not with regedit. All three major PC runtimes will set themselves as the current runtime if they start up and nobody else is set. They will also generally select themselves if the user uses a headset that uses that runtime.

In SteamVR's case it will set itself as the current runtime when SteamVR starts with a Lighthouse headset, or there's a button in settings that will do it at any time regardless of headset.

JoeLudwig avatar Oct 23 '20 21:10 JoeLudwig

@JoeLudwig Thanks Joe. In the case of Oculus it looks like the Oculus runtime starts automatically when launching Steam VR and a Rift connected. What runtime will be selected in that case?

At the moment It's hard to evaluate the different scenarios since WebXR doesn't work on Chrome neither with Oculus nor SteamVR OpenXR runtime (at least on my machine)

@alcooper91 Are you able to get any WebXR content presenting with Chrome with any headset or runtime? Are there any known bugs on blink / chrome we should keep track of?

Hopefully we can get to a point where it's plug and play. User connects headset, visits site, clicks enter VR and everything works without changing settings or knowing about OpenXR / runtimes.

dmarcos avatar Oct 23 '20 21:10 dmarcos

If the user has an Oculus headset SteamVR won't touch the registry automatically. It will only change the registry when the user clicks the "Set OpenXR to point at SteamVR" button in settings.

JoeLudwig avatar Oct 23 '20 22:10 JoeLudwig

Yes, I've been able to load WebXR sessions with WMR's OpenXR runtime, I believe Klaus was able to enter with a Valve headset through the SteamVR OpenXR runtime. It sounds like there may be some issue specific to Oculus's implementation/SteamVR talking with Oculus.

The co-worker who reported the Oculus issues is out right now, I'll ask him on Monday if he had filed an issue for the behavior he was seeing (nothing rendering on Oculus), which sounds like the behavior you were seeing. The only other issue I know of affects session termination, especially if that termination was originated by the runtime and not via session.end(). There's two bugs on that right now: https://crbug.com/1139279, https://crbug.com/1065149 (they are likely the same bug).

alcooper91 avatar Oct 23 '20 22:10 alcooper91

@alcooper91 Thanks for the info.

dmarcos avatar Oct 23 '20 22:10 dmarcos

I'm using Chrome 86.0.4240.111 and Oculus 23.0.0.18.517 (Public test channel enabled) and Oculus Link/Quest. No special flags are on, so it uses OpenXR.

WebXR works for me.

My only issues are that squeeze and trigger are not rounded when they should be 0 or 1, and that there's no haptic feedback. (squeeze and trigger rounded issue happens in Firefox, so I guess it's Oculus/OpenXR issue, while haptic feedback works on Firefox, so I guess it's an implementation issue in Chrome)

De-Panther avatar Oct 24 '20 17:10 De-Panther

It seems there's likely something machine-specific that causes Oculus over OpenXR to work/not work, as we currently suspect it's some form of timing issue, but it's still good confirmation to hear that it is working for someone :).

squeeze and trigger rounded issue happens in Firefox, so I guess it's Oculus/OpenXR issue

Chrome (and I'm assuming Firefox as well), looks to just plumb the "value" from the runtime without additional rounding, so I think this is correct.

while haptic feedback works on Firefox, so I guess it's an implementation issue in Chrome

That is correct, Chrome hasn't implemented haptic feedback for the WebXr Gamepads.

alcooper91 avatar Oct 26 '20 17:10 alcooper91

@De-Panther Thanks for investigating. Much appreciated.

Chrome (86 and 88) doesn't work for me either on Oculus Public Test Channel (Version 23.0.0.18.517) and the WebXR Sample. Just the Oculus runtime. No SteamVR running. navigator.xr.isSessionSupported('immersive-vr') returns false

dmarcos avatar Oct 26 '20 20:10 dmarcos

Update. I have now access to a Valve Index. I can consistently enter VR with Chrome 86 after setting SteamVR as default OpenXR runtime when Steam suggests at launch.

On the same machine I haven't been able to enter VR with Oculus Rift in any configuration. I tried with:

  • SteamVR + Steam OpenXR runtime set as default (same combo that works with Index).
  • Oculus OpenXR runtime set as default (via regedit) and 21.0.0.473.119 runtime
  • Oculus OpenXR runtime set as default and 23.0.0.43.517 runtime (Beta channel)

Firefox enters VR as expected in all configurations.

dmarcos avatar Nov 12 '20 03:11 dmarcos

I think that Firefox still uses WebVR and relay on the polyfill (edit: for WebXR)

De-Panther avatar Nov 12 '20 04:11 De-Panther

Firefox is indeed using WebVR (no polyfills) and I don't think it has an OpenXR back-end. It negotiates directly with the vendor SDKs. I added the info for completeness.

dmarcos avatar Nov 12 '20 04:11 dmarcos

If it helps anyone; I had the same issue in chrome 86 and 87 with WebXR Incubations set to enabled and the Force WebXr Runtime flag set to openXr. I've set both to default on chrome 87 and now my chrome apps are opening within my valve index.

This was after I read the reply of @klausw where he said this:

Interestingly, it's now working for me on Chrome stable (86) and Canary (88). (I didn't retest 87.), using the default OpenXR runtime with no Chrome flags.

driescroons avatar Nov 26 '20 22:11 driescroons

@driescroons Thanks so much for the info.

dmarcos avatar Nov 26 '20 22:11 dmarcos

I exprienced similar issues. I was trying to run the immersive WebXR example using Oculus Quest 2 with link last Friday (27th Nov) I tried with Chrome 87 and Canary 89, as well as Edge (chromium based) and Mozilla Firefox (latest available download for all).

  • set flags
  • WebXR Incubations: Enabled
  • Force WebXr Runtime: OpenXR

After installing and updating Oculus Desktop app (v 24.0) I realized no registry entry appeared for active runtime, so I had to manually create the following. ActiveRuntime (Expandable String Value) C:\Program Files\Oculus\Support\oculus-runtime\oculus_openxr_64.json

Path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1

It was not until I installed steamVR and set current OpenXR Runtime to SteamVR that I got it to work (On Canary 89 only)

agandia avatar Nov 30 '20 09:11 agandia

@agandia Thanks for the report. Much appreciated.

@toji Are any of the issues known? Should we report them anywhere? Thanks so much.

dmarcos avatar Nov 30 '20 11:11 dmarcos

@dmarcos can you try Chrome Canary? I was told we have reason to believe that this is fixed.

cabanier avatar Nov 30 '20 22:11 cabanier

Thanks. I gave it another try with the Rift and the webxr sample. No luck.

I manually set HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1 to C:\Program Files\Oculus\Support\oculus-runtime\oculus_openxr_64.json as suggested above

With the Oculus runtime and no Steam / SteamVR running:

  • On Chrome release (86) navigator.xr.isSessionSupported('immersive-vr') returns true and navigator.xr.supportsSession('immersive-vr') succeeds. The headset that is displaying the Oculus home goes black when entering VR but no content is presented.

  • On Chrome Canary (89) navigator.xr.isSessionSupported('immersive-vr') returns false

I'm on Oculus Runtime Version 23.0.0.43.517

With Steam VR and regedit config above the result is the same as with the Oculus Runtime alone.

Oculus / Steam VR home and any native content run as expected.

Also tried with Oculus Runtime Beta 24.0.0.22.393 and get the same results too.

dmarcos avatar Dec 01 '20 00:12 dmarcos

Has anyone tried Vive Cosmos with Chrome 86 or Canary? I can enter VR in the headset, but I cannot get the Cosmos controllers to work. Tried all the WebXR and ThreeJS samples. The OpenXR runtime in the Settings is "SteamVR"

iq3connect avatar Dec 03 '20 02:12 iq3connect

One more data point: Chrome 86 Oculus Quest via Link

All settings on default, didn't change anything, I can enter VR, but stuff gets quite strange from there onwards. E.g. in Mozilla's Hello WebXR demo the controllers are upside down. In the link you posted @dmarcos the left and right eyes are switched. Chrome also crashes when exiting VR in multiple (including A-Frame's) demos.

Update:

Chrome 87 seems to improve things, I could start the WebXR session just fine (https://immersive-web.github.io/webxr-samples/immersive-vr-session.html). This also worked: https://rocketvirtual.com/A-Frame_WebXR/Space_Carousel.html Chrome is still prone to crashing when playing with examples.

jure avatar Dec 04 '20 21:12 jure

I wonder if all those issues are Chrome issues or Oculus+OpenXR issues. Is there an OpenXR executable for testing?

De-Panther avatar Dec 04 '20 21:12 De-Panther

I wonder if all those issues are Chrome issues or Oculus+OpenXR issues. Is there an OpenXR executable for testing?

Chrome's multi-process architecture is causing issues with the OpenXR runtime.

cabanier avatar Dec 05 '20 18:12 cabanier

@cabanier: Do you know if anyone is looking into that? I heard it was a problem before (though apparently not for everyone) but don't know if any progress has been made on it from the Oculus side. If it IS a multi-process issue I doubt there's much on the browser side we can do to mitigate it. That's an important aspect of our security.

toji avatar Dec 10 '20 18:12 toji

@jure Thanks for the detailed report.

@toji Thanks for chipping in. Much appreciated

dmarcos avatar Dec 10 '20 18:12 dmarcos

All, I can give you a data point. iQ3 implementation works reliably on desktop Chrome 86/87 with Oculus Quest stand alone and link cable. The only remaining issue is the controller pointer is off 90 degs in desktop version (w link cable or Rift S). I understand this is a known issue in Oculus native OpenXR.

iq3connect avatar Dec 10 '20 18:12 iq3connect

@cabanier: Do you know if anyone is looking into that? I heard it was a problem before (though apparently not for everyone) but don't know if any progress has been made on it from the Oculus side. If it IS a multi-process issue I doubt there's much on the browser side we can do to mitigate it. That's an important aspect of our security.

Yes, I was told it is a problem with the multiprocess architecture. I pinged the engineer again.

cabanier avatar Dec 10 '20 20:12 cabanier

@cabanier do you know if there has been any changes in the Oculus Runtime in the last few days? It looks WebVR / WebXR is no longer working for all users on desktop: both Chrome and Firefox. Thanks for the info.

dmarcos avatar Mar 04 '21 22:03 dmarcos

I will check

cabanier avatar Mar 04 '21 22:03 cabanier

@dmarcos is it flaky or completely broken for everyone?

cabanier avatar Mar 05 '21 01:03 cabanier

@cabanier I asked the users that reported problems to participate here. For me WebXR hasn’t worked at all on desktop since I filed this issue. Tried all the solutions suggested above. I used to test on both Vive / Rift so I imagine that my computer is in weird state related to OpenXR runtimes conflicts. Thanks so much for investigating.

dmarcos avatar Mar 05 '21 04:03 dmarcos

For me WebXR no longer works for my Valve Index and Chrome. I contacted Valve support and they said it's an known bug and they are working on a fix.

kk262777 avatar Mar 13 '21 01:03 kk262777

The latest Steam VR beta contains a related update (for Vive). I haven't tried it yet though.

https://steamcommunity.com/games/250820/announcements/detail/3041591392731443550

Fix for applications in app containers failing to connect (ex. WebXR)

korinVR avatar Mar 13 '21 01:03 korinVR

I can confirm that Valve's OpenXR implementation was broken with WebXR in the latest stable release, but the most recent beta (1.16.10) did indeed fix it for me. You can opt in to the beta channel to get the fix right away, and my understanding is that it should roll into the stable release in maybe a week or so?

toji avatar Mar 13 '21 04:03 toji

It still doesnt work for me. It either doesnt do anything when I press "Enter VR", or it displays the scene, but doesnt track the HMD

guillefix avatar Mar 31 '21 00:03 guillefix

@guillefix Can you share headset / runtime / link to reproduce? Have you tested with the A-Frame examples

dmarcos avatar Mar 31 '21 00:03 dmarcos

For what it's worth: adding --disable-features=XRSandbox to my Chrome shortcut allows me to use AFrame's VR Examples in SteamVR on my Oculus CV1 with the latest Stable Chrome (89). No dice on getting Public Test Channel in the native Oculus Compositor to work...

One behavior I notice is that the VR button disappears upon entering VR... and the browser crashes if I try to use the back button while in VR.

zalo avatar Apr 14 '21 23:04 zalo

I gave this another try on my machine while investigating a reported bug with Vive.

With the WebXR samples I get same issue described above

I can click the Enter VR button but in headset I only see a "Chrome 90 Next Up" SteamVR modal and content never presents.

I tried both with Steam VR release channel (1.16.10) and beta (1.17.6). Same results with both

I'm on Windows 10 Pro (20H2 / 19042.928) and Chrome 90. Also same result with Chrome Canary (92).

I'm testing on a Vive Pro with original Vive wands.

@toji Is this still a known / open issue? Thank you

dmarcos avatar Apr 21 '21 22:04 dmarcos

I was able to reproduce the issue described above in Chromium Edge 90 on Windows 10 21H1 on SteamVR (both release and beta). The only supported backend is OpenXR.

In my case --disable-features=XRSandbox did the trick - that would seem to me that the issue is in the hands of SteamVR's OpenXR implementation and not A-Frame/Edge/Chrome.

I was using a Valve Index to test.

haolink avatar May 10 '21 07:05 haolink

@haolink Thanks so much for the info

dmarcos avatar May 11 '21 02:05 dmarcos

He also poked Joe about it on the SteamVR forum : https://steamcommunity.com/app/250820/discussions/8/2448217320134520064/

zalo avatar May 11 '21 20:05 zalo

No need to poke me over there. I'm watching this issue.

SteamVR support for OpenXR and this extension shipped months ago. I was running it this morning from a local build, but apparently something is going wrong with builds shipped via Steam.

Are there any log files in either Chrome or Edge that would provide insight into where it failed? Did it get through the OpenXR loader and actually load vrclient_x64.dll, for instance?

JoeLudwig avatar May 18 '21 20:05 JoeLudwig

@JoeLudwig Thanks for the info. I don't have a headset around at the moment to test.

Where are the log files you need stored? Maybe someone can give it a try and collect the info.

dmarcos avatar May 18 '21 22:05 dmarcos

Hello @JoeLudwig - thank you for that I wasn't aware you were the same person. Sorry for bugging you on both sides. I was trying to generate logs for Chrome as well as SteamVR using the instructions provided at https://developer.valvesoftware.com/wiki/SteamVR/Combined_Logging (for SteamVR) as well as https://www.chromium.org/for-testers/enable-logging (for Chrome).

The first results were pretty discouraging: the Session seems to be initialised fine on both sides - I was using a very simple WebXR example available at https://immersive-web.github.io/webxr-samples/immersive-vr-session.html .

I ended up digging deeper and download the source code of Chromium from googlesource to be able to debug it - whether the XRSandbox is enabled or not, Chromium doesn't seem to behave any differently when it comes to initialising OpenXR (performed in openxr_device.cc in the methods RequestSession and OnRequestSessionResult ). The submitted XRRuntimeSessionOptionsPtr object as well as the received XRSessionPtr object seem to be identical, they even contain information such as a display information for my Valve Index which seem plausible (view port size of 1912x2124) .

The main difference between the XRSandbox mode and the legacy mode is how Chromium initiliases its sub processes. When XR is requested for the first time, chrome.exe spawns a sandboxed sub process with lower permissions with several code mitigations. This process seems to be able to contact OpenXR but not render anything.

haolink avatar May 23 '21 08:05 haolink

Apps running in app containers don't have access to the SteamVR log directory. So the SteamVR logs show up somewhere inside the app container. They would be called xrclient_.txt if they're using OpenXR.

In a toy test app I managed to find them and learn stuff about them, but I don't think that generalizes very well. Combined logging won't work because that just writes to a log file that the app container can't write to.

BTW, I tracked down my difficulty getting WebXR to work to a configuration issue with my dev machine. It's working fine for me now.

JoeLudwig avatar May 24 '21 18:05 JoeLudwig

Hello Joe. Thanks for your input. I managed to find the xrclient.txt files. I submitted 4 of them.

Sandbox disabled:
-Chrome: xrclient_chrome_nosandbox.txt -MS Edge: xrclient_msedge_nosandbox.txt

Sandbox enabled:
-Chrome: xrclient_chrome_sandboxed.txt -MS Edge: xrclient_msedge_sandboxed.txt

So yeah, it's pretty clear:

Wed May 19 2021 21:38:40.588 - ComposeLayerProjection: failed to submit view 0: VRCompositorError_SharedTexturesNotSupported
Wed May 19 2021 21:38:40.588 - CD3D11VRRenderer::Initialize(): Failed to create input layout for vertex shader shaders/distort_vs.fxo!
Wed May 19 2021 21:38:40.588 - Error creating VR renderer.
Wed May 19 2021 21:38:40.588 - ComposeLayerProjection: failed to submit view 1: VRCompositorError_SharedTexturesNotSupported
Wed May 19 2021 21:38:40.599 - CD3D11VRRenderer::Initialize(): Failed to create input layout for vertex shader shaders/distort_vs.fxo!
Wed May 19 2021 21:38:40.599 - Error creating VR renderer.

So it seems VRCompositorError_SharedTexturesNotSupported - is our issue at hand?

haolink avatar May 27 '21 16:05 haolink

I had previously been able to use WebXR through Windows MR in Chromium 89. I don't recall if it worked in 90, but as of 91 it does not work anymore. 92 in the beta channel is similarly broken, but 93 in the dev channel works.

What's interesting is that, if my controllers are turned off, it works in 91, until the controllers are turned on.

The addition of --disable-features=XRSandbox had no effect.

Don't know if that's helpful to anyone. I know the original conversation was about SteamVR devices, but maybe this isn't a problem of Valve's OpenXR driver, but rather of an implementation issue in Chromium itself.

capnmidnight avatar Jun 25 '21 18:06 capnmidnight

@capnmidnight: Do you have a Samsung Odyssey by chance? There was a recent fix for an error that occurred when connecting controllers for that device.

toji avatar Jun 25 '21 19:06 toji

Yep, that is correct. Thank you.

capnmidnight avatar Jun 25 '21 19:06 capnmidnight

This is an oldish thread and it has a good chunk about Oculus - but I thought I would add that my combination of HTC Vive headset + Chrome 94 and SteamVR beta 1.20.1 would not work in looking at any WebXR (or AFrame WebVR) content and did as described above (i.e. showed a startup logo for Chrome but nothing more).

For me the addition of --disable-features=XRSandbox fixed the issue (I mention this as my googles did not get anything specific to my issue so wanted to help reduce other peoples search time to find a solution)

aitchpea avatar Sep 21 '21 19:09 aitchpea

@JoeLudwig Hello - I'm sorry to ping you directly. Has there been any progress on the issues especially with the logs provided above. So far it still only seems to work if the XRSandbox on Chromium based browsers is disabled - while it does work on Firefox. Would it be an issue to forward to Chromium or is it an SteamVR related issue as (at least some people) claim it would work with Oculus devices running OpenXR within Chromium.

You essentially wrote in the comment 847246039 in this ticket how it would be working on your development machine by now. Any estimate when the fix might roll out onto SteamVR betas? So far it doesn't seem to have arrived there yet. Thank you ^^.

haolink avatar Oct 14 '21 13:10 haolink

For me the addition of --disable-features=XRSandbox fixed the issue (I mention this as my googles did not get anything specific to my issue so wanted to help reduce other peoples search time to find a solution)

Fixed my issue as well. Thank you so much!

fybits avatar Feb 09 '22 14:02 fybits

Oculus rift user here: --disable-features=XRSandbox worked for me too, once I set the openXRRuntime on oculus app to oculus (previously, I had steam vr). Now I can get xr mode on chrome and edge (but not firefox).

$ "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-features=XRSandbox

oculus_screen_shot

vt5491 avatar Feb 22 '22 03:02 vt5491

I am trying to get this to work, but run into problems.

The --disablefeatures option work only when I run Chrome as administrator. Then I am able to run the AFrame examples.

But when I run the Unity WebXR desert example I get problems. I can load the scene and it works fine in 2D. When I click on the VR icon the view on the screen splits in two, but I get the error Uncaught TypeError: Cannot read properties of null (reading 'transform') In the console: Uncaught TypeError: Cannot read properties of null (reading 'transform') at XRManager.getGamepads (webxr.js:227:35) at XRManager.animate (webxr.js:347:28) at XRSession. (webxr.js:147:28)

When I tried it in Edge the scene also loads and works fine in 2D. When I clicked on the VR icon the screen split and the headset was tracking. I could see the image on the screen move. One of the controllers was off and when I switched it on I got the same uncaught TypeError.

So I then did a test without the controllers. Now also in Chrome the headset is tracked, but the image in my Vive is still completely black. And at some point Chrome crashed, so I had tp type this twice....

I am using an HTC Vive and SteamVR 1.21.12, with current OpenXR environment set to SteamVR. The Khronos OPenXR version in the registry is 1

joostVRbeelding avatar Mar 23 '22 14:03 joostVRbeelding

Thanks everybody for the detailed reports

@toji @klausw Are these issues collected anywhere? Should we submit the details somewhere? Thanks!

dmarcos avatar Mar 24 '22 19:03 dmarcos

Hello thank you for this work.

I think my question is related- question I'm having trouble finding answers to- I have an Oculus Link cable, and when connected/in developer mode I can view WebXR experiences, ( chrome Version 99.0.4844.84 (Official Build) (64-bit) btw).. But without my link cable connected I am not able to do the experiences

My question is...is there a way to view these same WebXR experiences without a link cable? Do most people with a Quest have a link cable? I thought no? But maybe I'm wrong.

Can someone explain or point me in a direction

I am asking because I would like to share WebXR experiences with friends (I'm thinking people who have an Oculus 2, but not a link cable and don't have developer mode as an option...

I am asking here because to be honest I haven't really been able to find simple documentation on how to view WebXR (especially for non-developers) (info like what headsets currently work, what web browsers you can use, if a link cable is required, if developer mode is required etc Where is that information??

WebXR site simply says this "Enable VR by rendering the scene using the platforms VR capabilities."

And Oculus mostly has developing for webxr info

msvawer avatar Mar 31 '22 12:03 msvawer

Oculus Browser, which is installed by default on the Quest, supports WebXR. Actually, it probably has the best WebXR support of any browser. If a particular WebXR experience doesn't work in Oculus Browser, it's probably a problem with that site in particular.

capnmidnight avatar Mar 31 '22 18:03 capnmidnight

@joostVRbeelding which demo? The mozilla unity exporter was dropped a long time ago. This one should work https://de-panther.github.io/unity-webxr-export/Build

De-Panther avatar Mar 31 '22 19:03 De-Panther

Oculus Browser, which is installed by default on the Quest, supports WebXR. Actually, it probably has the best WebXR support of any browser. If a particular WebXR experience doesn't work in Oculus Browser, it's probably a problem with that site in particular.

If a website is making the assumption that it's running on Quest with Quest controllers, it's definitely a site problem.

cabanier avatar Mar 31 '22 20:03 cabanier

@joostVRbeelding which demo? The mozilla unity exporter was dropped a long time ago. This one should work https://de-panther.github.io/unity-webxr-export/Build

Oh man, why do I hate my job.... :-) I just spent more than an hour trying things out, troublshooting, writing a lengthy reply about what did not work (also in the demo link you sent) and that Unity did not show me the updated version.

And then I did get the update notice in the Package Manager and after updating to package 0.14.0 the VR stuff works. Also in the demo version. I don't know how this can be related, espcially for the demo version, but the VR part works now.

The desktop part still doesn't work, however. I can not move using the arrow keys or wasd and I can not look around using the mouse. This happens both in the demo version and in my own build.

I hope that's an easier fix than the VR stuff.

Thanks!

joostVRbeelding avatar Apr 06 '22 10:04 joostVRbeelding

I'm running a Lenovo Explorer in Windows 10.

Initially, I was using Firefox with the WebXR flags set to true including WebVR. Running native VR content everything appears normal and as expected in Microsoft's MR Portal and SteamVR Home. Running WebXR in A-Frame or trying out the WebXR examples page, the controllers do not display although the headset is tracked normally.

Using Ada Rose Cannon's WebXR Boilerplate, I see the correct controllers (no hand geometry) which are tracked correctly but the buttons/triggers have no functionality. The thumbstick will project a teleport arc but this then 'sticks' (displayed) without any means to trigger the actual teleport.

On trying Chrome or Edge did not launch the A-Frame project(s), the 'VR' button simply turned red on clicking. Using the WebXR example page I had a tool-tip feedback on clicking "Enter VR" button saying: 'The specified session configuration is not supported'.

CrowtreesStudio avatar Apr 22 '22 14:04 CrowtreesStudio

@CrowtreesStudio Can you share the required/optional features you're requesting?

If you can install (from the Microsoft store) "OpenXR Tools for Windows Mixed Reality" and share the information from under "OpenXR Runtime" that would help as well.

It seems like the controller issues are likely a browser bug, and it may be worthwhile to file a new issue for that (if you do, please mention it should be routed to Blink>WebXR/alcooper@); but I'm not sure about A-Frame failing to enter VR when the boilerplate is (if you can link to the specific sample that would be great as well), so that could be an A-Frame issue.

alcooper91 avatar Apr 22 '22 18:04 alcooper91

@CrowtreesStudio Can you share a link to the A-Frame example that reproduces the issue? Thank you and sorry for the inconvenience.

dmarcos avatar Apr 22 '22 18:04 dmarcos

Just to add my experience for future searches.

Using Chrome (100.0.4896.127) and a Valve Index a-frame works as expected.

However SteamVR always crashes when exiting Chrome from the SteamVR menu or via hot reloading (which ends the immersive session and loads SteamVR's Home). Opting into the SteamVR beta reduces the crashes significantly. In about 2 hours of development with frequent hot reloading SteamVR crashed once after opting into the beta.

luisscholl avatar Apr 24 '22 21:04 luisscholl

@dmarcos This is a link to an earlier version of Ada's boilerplate I'm using to test with. https://crowtreesstudio.github.io/Adas_XR_boilerplate/index.html In this version I can see the controllers and produce the teleport arc as described in my first post.

This is the XR example I tried which which produces the tooltip error "The specified session configuration is not supported" when clicking the VR button in Chrome and Edge. https://immersive-web.github.io/webxr-samples/immersive-vr-session.html

What maybe confusing in my original post is that I'm talking about two issues I'm having: One is that the controllers do not display and/or function correctly in WebXR and secondly, I'm unable to launch a VR file from Chrome or Edge.

I downloaded the OpenXR Tools as you suggest @alcooper91 and screenshot is below.

PS I just tested Babylonjs XR using the Hill Valley example (https://www.babylonjs.com/demos/hillvalley/) and it behaves identically to the above, so something else is going on and it's not specific to A-Frame or Three.js. Sorry if that adds further confusion. My usual methods of problem solving are failing me now and I find myself frustrated and confused as to how to proceed.

PSS Quick note: I've been using Firefox with webxr flags set to true to test with since Chrome and Edge don't like me at the moment. Just tested above links and now controllers don't even show up. A little consistency would be great :(

openxr

CrowtreesStudio avatar Apr 25 '22 14:04 CrowtreesStudio

Just to add my experience for future searches.

Using Chrome (100.0.4896.127) and a Valve Index a-frame works as expected.

I'll just quickly ask - this is my configuration as well - did you have to use --disable-features=XRSandbox as launch parameter or did it work without? For me I have to assign these still.

Because while it's nice that it's working this way, it's not production ready this way if you need to explain to users that they need to modify their Chrome launch parameters. Firefox works.

haolink avatar Apr 25 '22 17:04 haolink

@luisscholl @haolink @CrowtreesStudio Thanks so much for collecting and sharing the info.

dmarcos avatar Apr 26 '22 03:04 dmarcos

@haolink I wouldn't even know how to disable a feature as you describe. I'm using this 'out of the box' as I'm primarily a designer with intermediate coding skills. Like you, I'm looking for a solution that also works 'out of the box' and requires no extra work on the players/users. For my students, A-Frame provides a scaleable experience and (as they are design students) requires minimal coding experience. No problem @dmarcos, I appreciate yours and everyone's time on this. Thank you.

CrowtreesStudio avatar Apr 26 '22 13:04 CrowtreesStudio

@haolink I only enabled "WebXR Incubations" at chrome://flags. (You can enter chrome://flags into the URL bar.) I did not have to use --disable-features=XRSandbox. Should have mentioned this earlier.

luisscholl avatar Apr 26 '22 17:04 luisscholl

I've filed https://crbug.com/1319971 for the controller issues you were seeing @CrowtreesStudio Let's keep further discussion there to try to isolate this from some of the other issues about entering VR.

I think our error messages are fairly generic (though there should be more detail in the dev tools console which you can pull up with ctrl+shift+I), but it's worth noting that you can only have one active WebXR session at a time, so if it didn't fully exit a previous session, that could cause it to fail. If you can enter, it would be great if you could try the following sites and report what happens/what you see in the bug I linked above: https://immersive-web.github.io/webxr-samples/controller-state.html https://immersive-web.github.io/webxr-samples/input-profiles.html

alcooper91 avatar Apr 26 '22 17:04 alcooper91

@haolink part of the SteamVR installer should have set appropriate permissions on your SteamVR folder during installation to enable working without disabling the sandbox, as Chrome needs appropriate permissions to access the code while Sandboxed; so it sounds like something went wrong during your installation or an update where those permissions weren't set on the folder. Someone from Valve may be able to help you troubleshoot that.

alcooper91 avatar Apr 26 '22 17:04 alcooper91

@alcooper91 Thank you very much. Apparently it might have been related to the fact that I've used SteamVR for 5 years and never had to reinstall it - the permissions for OpenXR sandboxing apparently weren't set up. I fully uninstalled it, removed its settings files and reinstalled it. Tada, everything working fine. Thank you very much.

haolink avatar Apr 26 '22 19:04 haolink