MozillaReality / FirefoxReality

INACTIVE - A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://mzl.la/reality
Mozilla Public License 2.0
769 stars 217 forks source link

Random behaviour when trying to auto enter VR on Oculus Go #966

Closed fernandojsg closed 3 months ago

fernandojsg commented 5 years ago

Hardware

Oculus Go

Steps to Reproduce

  1. Visit https://mixedreality.mozilla.org/webgfx-tests/examples/tests/threejs/webvr_cubes.html with --ez dom.vr.require-gesture false option.

Current Behavior

It automatically enter in immersive mode but sometimes it just show a solid color on the background without any geometry being rendered at all.

Expected Behavior

If you enter VR manually it should render the cubes and the wireframe background as in 2D mode. You can try it on firefox desktop (with dom.vr.require-gesture set to false)

Additional info

MortimerGoro commented 5 years ago

I also was able to reproduce the problem with the return false

MortimerGoro commented 5 years ago

I tried different approaches:

But didn't fix the issue. FxR VR session debug lines seemed ok during the black/solid color issues, WebVR in a presenting state and receiving textures from GV pool correctly for each frame.

I wonder if it is a Gecko bug similar to this one we fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1492554

MortimerGoro commented 5 years ago

It seems to work better after the latest GV version. I edited one of the WebVR samples to automatically enter WebVR (test.html.zip) and it worked for me 100% of the times when starting the application from scratch with the URL as the default one.

However, it doesn't work the first time if you exit the APP and reopen it instead of killing it. In that case we are using GV session recovery, cc @bluemarvin is the main JS run again when recovering a session or it loads a cached state? It works correctly when reloading but not the first time after a recovery.

@philip-lamb I don't think this is a blocking task for v1.1.4. It's only used for perf benchmarks and the tools always kill the app before launching each demo. Real users can never trigger this path for security reasons

philip-lamb commented 5 years ago

Thanks @MortimerGoro. We can wait for @bluemarvin to comment on the GV session-recovery aspect (and edit the bug description if that is indeed an issue) but I'm happy to defer this for now.