Enter VR Button on VR Samples not working with Firefox Reality

Hi all

I’ve been trying to make some WebXR content work recently and have been failing. Just now I tried out the threejs VR example files i.e. https://threejs.org/examples/?q=vr#webxr_vr_ballshooter

I’ve been accessing via Oculus Quest in the Firefox Reality browser. When I hit “Enter VR” the small googles symbol pops up in the address bar but nothing else changes i.e. the goggles do not enter VR and i’m still looking at a normal browser page. If i visit the same site on my android phone in chrome, when i press the button it launches correctly into a VR mode for google cardboard.

I’ve tried visiting https://mixedreality.mozilla.org/hello-webxr/ and this DOES work in the Quest.

Is there something obvious I’m doing wrong? Or an obvious setting i’ve not enabled or something? I believe my OS is up to date and I have the latest Firefox Reality version.

Any help/advice/pointers would be massively appreciated.

James

Does it work when using Oculus browser?

1 Like

Hi @Mugen87 thanks a lot for the quick reply. It DOES seem to work in Oculus Browser.

I was using Firefox as it works for viewing VR models on Sketchfab.com

Is there something i can do to make the Firefox browser work or does it simply not have support?

When I hit “Enter VR” the small googles symbol pops up in the address bar but nothing else changes i.e. the goggles do not enter VR and i’m still looking at a normal browser page.

I can actually reproduce the issue with Firefox Reality and Oculus Quest. Unfortunately, I was not able to debug the issue so far. It’s pretty simple to use remote debugging for Oculus browser but I don’t know how to do this for Firefox Reality. Checking the console logs would be an important step to find out what’s going wrong.

Okay, I was able to use remote debugging with Firefox Reality. I was actually quite easy^^. Just follow this guide:

https://developer.mozilla.org/en-US/docs/Tools/about:debugging

This is the error message from the console:

InvalidStateError: XRWebGLLayer constructor: Can not create an XRWebGLLayer without first calling makeXRCompatible on the WebGLRenderingContext or WebGL2RenderingContext.

@mrdoob Should we report this to Mozilla? AFAICS, three.js does call makeXRCompatible() prior to new XRWebGLLayer( session, gl, layerInit );.

After some research, the issue seems already fixed! It’s just a matter of waiting for a new version of Firefox Realiy:

2 Likes

@Mugen87 you are a hero! Thanks a lot for your extensive research on this stuff and the clear explanations. Massively appreciated. I guess i will wait for Firefox Reality to update then!

James

1 Like