Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

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

Closed
fernandojsg opened this issue Feb 22, 2019 · 4 comments
Closed

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

fernandojsg opened this issue Feb 22, 2019 · 4 comments
Assignees
Labels
ARCHIVED CLOSED at time of archiving bug This issue is a software or functional defect P3 Backlog
Milestone

Comments

@fernandojsg
Copy link

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

  • If I add a timeout of around >2000ms it works as expected 100% of the cases, if I use ~1000ms it works correctly just sometimes:
setTimeout(() => {
      scene.background = new THREE.Color( 0xff0000 );
      navigator.getVRDisplays().then(displays => {
        device = displays[0];
        //if (device.isPresenting) device.exitPresent();
        device.requestPresent( [ { source: renderer.domElement } ] );
      })
    }, 0);
@philip-lamb philip-lamb added bug This issue is a software or functional defect P1 Fix in the current development iteration backlog labels Feb 25, 2019
@philip-lamb philip-lamb added this to the v1.1.3 milestone Feb 25, 2019
@MortimerGoro MortimerGoro self-assigned this Feb 26, 2019
@MortimerGoro
Copy link
Contributor

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

@MortimerGoro
Copy link
Contributor

MortimerGoro commented Feb 27, 2019

I tried different approaches:

  • Move calling loadUri to onResume
  • Wait for the first render on the Gecko session surface
  • Do not pause the compositor when VR session starts

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

@philip-lamb philip-lamb modified the milestones: v1.1.3, v1.1.4 Mar 18, 2019
@MortimerGoro
Copy link
Contributor

MortimerGoro commented Apr 5, 2019

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
Copy link
Contributor

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.

@philip-lamb philip-lamb added P3 Backlog and removed P1 Fix in the current development iteration labels Apr 7, 2019
@philip-lamb philip-lamb modified the milestones: v1.1.4, v1.x Apr 7, 2019
@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving bug This issue is a software or functional defect P3 Backlog
Projects
None yet
Development

No branches or pull requests

4 participants