Closed Bug 1389220 Opened 7 years ago Closed 7 years ago

SteamVR automatically launched when heading to robertsspaceindustries.com

Categories

(Core :: WebVR, defect, P1)

55 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- unaffected

People

(Reporter: megaone, Assigned: kip)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170803103124

Steps to reproduce:

Open robertsspaceindustries.com


Actual results:

SteamVR is launched


Expected results:

Might be interesting for some, but shouldn't happen by default.
Component: Untriaged → WebVR
Product: Firefox → Core
I have the same happening when visiting:
- https://bankieren.rabobank.nl/klanten/?language=nl (note the NL language, doesn't seem to do it for EN)
- https://mozvr.com/ (here it starts before the page is even loaded, blocking for 10-20 seconds).

In both cases I haven't clicked any action to start VR. Apparently just having some 3D scene in a page (though no idea where the banking site would have that hidden or used for even) activates SteamVR. Clearly this should only happen when you click some button.

When I close SteamVR with either page still open, after a few seconds, the browser hangs for about 5 seconds and SteamVR is started again.

Browser: Firefox 55.0.1 (64-bit), Windows 10. (Also) with a just created profile.

I reported a different URL in issue #1351048 before. But there it doesn't occur anymore. Also, that issue was already closed, so I shouldn't have commented there. I'm just mentioning the issue here because it is related.
Btw, I do also have it happen visiting the first mentioned website robertsspaceindustries.com.
Indeed it should have kind of icon on address bar if VR is available for the site. Not launching VR solution automatically on desktop. It's desktop after all.

As a workaround i switched WebVR entirely off for now
dom.vr.enabled=false
Thanks. I have disabled it myself now too.
I hadn't touched any of the dom.vr settings yet. But now I see dom.vr.autoactivate.enabled . That is set to false (default). You'd think that would actually prevent this automatic starting of SteamVR. But it clearly doesn't.
I second regs' comment, there should be a page notification to launch VR instead of launching automatically, it's very annoying to have SteamVR continuously pop-up especially without the headset connected.
This is indeed super annoying. I have many pages opened but none of them is VR related and yet my SteamVR is launched by itself every time I start Firefox. I'm running 56.0b12 (64-bit).
Thanks for reporting this.  I have reproduced and will investigate the false-launches and hanging further.  SteamVR should only be launching for sites that actually will use the WebVR API, not just 3d scene with WebGL or three.js.

We are also working on some UI that should give you more direct control over which sites are able to access your VR hardware.
Assignee: nobody → kgilbert
Priority: -- → P1
I have found the cause of this...

When calling navigator.activeVRDisplays, it should only return the list of active VR displays without activating any new ones.  Unfortunately, a bug in the function is causing it to flag the page as a WebVR site, causing the VR hardware to initialize.

Somes sites that do not have any WebVR content are still calling navigator.activeVRDisplays.
One example is a library called "BehavioWeb", as used on https://bankieren.rabobank.nl.

BehavioWeb tries to profile users in order to determine if they are likely the same person that accessed the site last time, aiding authentication into the banking login.  Part of their algorithm involves serializing all the attributes on "Navigator" and sending them in an AJAX request to their server.  This includes an access to Navigator.activeVRDisplays...  Thus triggering the OpenVR startup.

This should be an easy fix for this case.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
The pause in the browser that occurs when hitting a WebVR page with SteamVR installed but no devices attached will be fixed separately in Bug 1392216.
Attachment #8910521 - Flags: review?(dmu)
Comment on attachment 8910521 [details]
Bug 1389220 - Prevent navigator.activeVRDisplays from activating VR hardware and runtimes

https://reviewboard.mozilla.org/r/181946/#review187362

LGTM
Attachment #8910521 - Flags: review?(dmu) → review+
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b37909c3b506
Prevent navigator.activeVRDisplays from activating VR hardware and runtimes r=daoshengmu
https://hg.mozilla.org/mozilla-central/rev/b37909c3b506
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57

I hate to bump a 3-year-old thread, but this still happens today under Firefox 74.0.1 on Windows 10. On any site containing optional VR functionality (e.g. Sketchfab), merely giving the site the WebXR permission causes SteamVR to launch (instead of just letting the site discover connected device(s) and expose the option for the user to enter VR).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: