question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use navigator.getVRDisplays if served over HTTPS

See original GitHub issue

This issues is related to #4336

Getting the following error when serving an A-frame project over HTTPS which leads to no controller loading in my scene.

Cannot use navigator.getVRDisplays if WebXR is already in use.

  • A-Frame Version: 1.0.4
  • Platform: Oculus Quest Browser (Chromium 79.0.3945.126)

Update March 30, 2020

Sorry for initial rudimentary info.

Looks like the issue is only happening with WebXR Device API enabled.

How to reproduce

  • On Oculus Quest go to https://codercat.tk/test/.
  • Click enter VR (No controllers will be shown) end Cannot use navigator.getVRDisplays if WebXR is already in use. error will show if you connected over ADB to Chromium console.
  • Now go to chrome://frlags
  • Disable WebXR Device API and relaunch the Browser
  • Now enter VR again (no error and controllers are working)

Disabling Web VR completely and keeping WebXR Device API enabled lead to the same result. Code for the test project located here

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dmarcoscommented, Apr 20, 2020

You can use master builds

See commits for links in the future

0reactions
sneha-belkhalecommented, Apr 20, 2020

@dmarcos , thanks for the pointer, we managed to get the controllers showing up by removing calls to deprecated APIs. However, we are still not able to move using the oculus-touch-control joystick. I believe it is related to #4472 – which was fixed after 1.0.4 was released.

How can we use an a-frame build that reflects the most recent state?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Navigator.getVRDisplays() - Web APIs - MDN Web Docs
The getVRDisplays() method of the Navigator interface returns a promise that resolves to an array of VRDisplay objects representing any ...
Read more >
Navigator.getvrdisplays() not working on Oculus Quest browser
Error getvrdisplays is not a function on Oculus browser, but it does work on mozilla and did work some time ago for oculus...
Read more >
Detect WebVR Support with JavaScript - David Walsh Blog
If navigator.getVRDisplays is present, it's likely that the browser supports VR and AR experiences. Virtual reality and augmented reality ...
Read more >
Prototyping with React VR - Medium
Finally, React VR utilizes WebVR's new navigator.getVRDisplays() API to send the 3D scene to the user's head mounted display, such as an Oculus ......
Read more >
Intent to ship: WebVR on Windows in Release - Google Groups
If there is no VR hardware, is the idea that navigator.getVRDisplays() returns a promise resolving to an empty array? > ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found