pmndrs / react-xr

🤳 VR/AR with react-three-fiber

Home Page:https://npmjs.com/@react-three/xr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Oculus Quest 2 support with latest Chrome/Firefox

getarun opened this issue · comments

commented

Hello,

I try to run the examples, but get stuck with an AR unsupported Text in the buttom button.
I installed Oculus software, connected the Quest 2 via Air Link to the computer and ran the local examples.
The demos show up, but each shows "AR unsupported", on both chrome and firefox. Closing Oculus software doesn't change anything. Online code examples show the very same error. Switching from Oculus to the OpenXR runtime does not change anything.

Feels like I am missing some dependencies :(

Any ideas?

Additional information from browser console (chrome):

  • navigator.xr.isSessionSupported('inline').then(console.log) => true
  • navigator.xr.isSessionSupported('immersive-ar').then(console.log) => false
  • navigator.xr.isSessionSupported('immersive-vr').then(console.log) => false

Versions:

  • Windows 10
  • node 14.18.1
  • chrome 110.x
  • firefox 110.x
  • oculus runtime version: 1.81.0
    • API version: 1.0.24
  • WindowsMixedReality runtime version: 112,221,2002
    • API version: 1.0.24

Thank you :)

commented

Hi,
I had the same problem, I used this solution #217

commented

Secure Context is provided when calling https://localhost:xxxx, as I understand correctly. The online examples in the codebox are https://, too, but who knows :D

The examples use vite which is configured to provide SSL context in its vite.config.js

serve: {
    root: 'examples',
    plugins: [react(), ssl(), vanillaExtractPlugin()],
    server: { host: '0.0.0.0', https: true },
    resolve: {
      alias: {
        '@react-three/xr': path.resolve(process.cwd(), 'src')
      }
    }
  }, 
  [...]

TY

That is indeed the issue, WebXR requires a secure origin to use which can either be via https or any protocol over localhost.

I just released v5.3.0 which will give better hints than "unsupported" for this case.

commented

Ty for that, my issue seems to be somewhere else.

navigator.xr.isSessionSupported('immersive-ar')

return false. No clue why :)

Maybe I am in the wrong place to ask, since session support is not handled by this package :)

@getarun I don't think immersive-ar is supported in oculus link mode at all. Maybe there's a way to force use of mixed reality runtime for the quest 2, but I'm not sure if it's even possible

Best way to check whether its react-xr fault or not is to use https://immersive-web.github.io/webxr-samples/tests/

commented

okay, me being stupid :) Air link wasn't established correctly (SteamVR did not show headset). Installed Microsoft Mixed Reality in steam and started SteamVR. Headset was connected with wireless (5GHz | 80 Mhz Channel width).
Button now shows Enter Vr.

navigator.xr.isSessionSupported('immersive-vr') => true

Pressing the button results in

Uncaught (in promise) DOMException: The specified session configuration is not supported.

Will try different session configurations - which did not help.

Updating Oculus software from 49.x to 50.x (public test channel) helped.

commented

/closed