New issue
Advanced search Search tips

Issue 678283 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug
Proj-XR



Sign in to add a comment

WebVR: getVrDisplays() promise hang forever on desktop with origin-trial

Reported by zaz...@gmail.com, Jan 4 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.28 Safari/537.36

Steps to reproduce the problem:
1. access a website with origin-trial enabled for webvr
2. call `navigator.getVrDisplays()`

What is the expected behavior?
getting a resolved or rejected promise

What went wrong?
the promise is never resolved or rejected...

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 56.0.2924.28  Channel: beta
OS Version: OS X 10.12.2
Flash Version: Shockwave Flash 24.0 r0

- works fine on Android 6.0.1 with chrome beta 56
- doesn't work on windows 10 or mac sierra with chrome beta 56
- fyi, the webvr flag (chrome://flags) is available on android but not on desktop
 
Labels: M-56 VR-Desktop Proj-VR OS-Windows
1. Since displays are not currently supported on desktop, we should be resolving with an empty sequence. (Rejecting the promise would not be appropriate.)
2. The flag should be present on all platforms. It isn't enabling devices; it is enabling the APIs.
Labels: OS-Linux
Owner: bajones@chromium.org
Status: Started (was: Unconfirmed)
"Since displays are not currently supported on desktop, we should be resolving with an empty sequence. (Rejecting the promise would not be appropriate.)"

This is indeed the expected behavior. I think what's happening here is that the API is exposed but the service is never spun up because we don't build desktop with WebVR enabled yet. So when we attempt to make the service connection it never resolves and calls out to it never get returned.

I should be able to solve this relatively easily.
Cc: bsheedy@chromium.org
Thanks, bajones. This should be an easy cross-platform WPT test case too. Test that the call is always resolved. It looks like our current layout tests for getVrDisplays() use a mock service and thus don't catch this.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9bc3d1863a23cbbf84d867cdc4bfa986810fdf1b

commit 9bc3d1863a23cbbf84d867cdc4bfa986810fdf1b
Author: ddorwin <ddorwin@chromium.org>
Date: Fri Jan 06 02:01:36 2017

Always include "enable-webvr" in about:flags

The WebVR API and origin trial are always built so this flag should not depend
on VR device support.

BUG= 678283 
TEST=The flag appears in chrome://flags and navigator.getVRDisplays is exposed when enabled.

Review-Url: https://codereview.chromium.org/2615973002
Cr-Commit-Position: refs/heads/master@{#441816}

[modify] https://crrev.com/9bc3d1863a23cbbf84d867cdc4bfa986810fdf1b/chrome/browser/about_flags.cc

The commit above addresses (2) in comment 1. https://codereview.chromium.org/2614873002/ will address (1).
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d83aedbf719e5346d2de69a79b5a1d7e9b6c8462

commit d83aedbf719e5346d2de69a79b5a1d7e9b6c8462
Author: bajones <bajones@chromium.org>
Date: Sat Jan 07 00:54:08 2017

Ensure navigator.getVRDisplays always resolves.

In the case that the backing VR service is not available the call will now
resolve to an empty array.

BUG= 678283 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2614873002
Cr-Commit-Position: refs/heads/master@{#442117}

[modify] https://crrev.com/d83aedbf719e5346d2de69a79b5a1d7e9b6c8462/content/browser/frame_host/render_frame_host_impl.cc
[add] https://crrev.com/d83aedbf719e5346d2de69a79b5a1d7e9b6c8462/third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html
[modify] https://crrev.com/d83aedbf719e5346d2de69a79b5a1d7e9b6c8462/third_party/WebKit/Source/modules/vr/VRController.cpp

Status: Fixed (was: Started)
We want to merge to M56 after verifying in stable, right?
Labels: Merge-Request-56
Correct.
Project Member

Comment 10 by sheriffbot@chromium.org, Jan 9 2017

Labels: -Merge-Request-56 Hotlist-Merge-Approved Merge-Approved-56
Your change meets the bar and is auto-approved for M56. Please go ahead and merge the CL manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62938a72f596f94b55e7c8f4f152b2460554e178

commit 62938a72f596f94b55e7c8f4f152b2460554e178
Author: tobiasjs <tobiasjs@chromium.org>
Date: Mon Jan 09 13:19:03 2017

Revert of Ensure navigator.getVRDisplays always resolves. (patchset #6 id:100001 of https://codereview.chromium.org/2614873002/ )

Reason for revert:
Caused builder failures(e.g. https://uberchromegw.corp.google.com/i/internal.client.clank/builders/x64-builder) when building blimp.

undefined reference to `device::mojom::VRService::Name_'

Original issue's description:
> Ensure navigator.getVRDisplays always resolves.
>
> In the case that the backing VR service is not available the call will now
> resolve to an empty array.
>
> BUG= 678283 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
>
> Review-Url: https://codereview.chromium.org/2614873002
> Cr-Commit-Position: refs/heads/master@{#442117}
> Committed: https://chromium.googlesource.com/chromium/src/+/d83aedbf719e5346d2de69a79b5a1d7e9b6c8462

TBR=rockot@chromium.org,alexmos@chromium.org,ddorwin@chromium.org,bajones@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 678283 

Review-Url: https://codereview.chromium.org/2614353002
Cr-Commit-Position: refs/heads/master@{#442244}

[modify] https://crrev.com/62938a72f596f94b55e7c8f4f152b2460554e178/content/browser/frame_host/render_frame_host_impl.cc
[delete] https://crrev.com/e4faf83271909053e53e988ffc274eb6ef6f7702/third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html
[modify] https://crrev.com/62938a72f596f94b55e7c8f4f152b2460554e178/third_party/WebKit/Source/modules/vr/VRController.cpp

Status: Started (was: Fixed)
Project Member

Comment 13 by sheriffbot@chromium.org, Jan 12 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 14 by bugdroid1@chromium.org, Jan 14 2017

Project Member

Comment 15 by sheriffbot@chromium.org, Jan 16 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 16 by bugdroid1@chromium.org, Jan 17 2017

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b963393a689eccefe4d9a72c58fca36c05056c18

commit b963393a689eccefe4d9a72c58fca36c05056c18
Author: Brandon Jones <bajones@chromium.org>
Date: Tue Jan 17 18:20:08 2017

Ensure navigator.getVRDisplays always resolves.

Second attempt at landing. See https://codereview.chromium.org/2614873002/

In the case that the backing VR service is not available the call will now
resolve to an empty array.

BUG= 678283 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
TBR=rockot@chromium.org, alexmos@chromium.org

Review-Url: https://codereview.chromium.org/2630003002
Cr-Commit-Position: refs/heads/master@{#443791}
(cherry picked from commit a74a47aec12401d3ea3643aea1d8b66d908c32cc)

Review-Url: https://codereview.chromium.org/2635293002 .
Cr-Commit-Position: refs/branch-heads/2924@{#780}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/b963393a689eccefe4d9a72c58fca36c05056c18/content/browser/BUILD.gn
[modify] https://crrev.com/b963393a689eccefe4d9a72c58fca36c05056c18/content/browser/frame_host/render_frame_host_impl.cc
[add] https://crrev.com/b963393a689eccefe4d9a72c58fca36c05056c18/third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html
[modify] https://crrev.com/b963393a689eccefe4d9a72c58fca36c05056c18/third_party/WebKit/Source/modules/vr/VRController.cpp

Status: Fixed (was: Started)
Cc: rbasuvula@chromium.org
Labels: Needs-Feedback
Verified this issue on Mac 10.12.2,Win 10.0 & Ubuntu 14.04 using chrome latest beta M56-56.0.2924.67 by following steps.

1.Enable the Origin-Trail flag in chrome://flags.
2.Navigate to console and run the `navigator.getVrDisplays()`
Observed that: Uncaught TypeError is displaying.
Please find the screen shot for reference.

@bajones:Could you please verify the screen shot and please let us know if it is the expected behavior else please provide the test steps to verify the issue.

Thank You!
678283.png
270 KB View Download
Sorry, that wouldn't have triggered the bug.

You would need to hit a page which has the appropriate Origin Trial token with a desktop build. Otherwise the API won't be exposed. https://webvr.info/samples/03-vr-presentation.html has the token. On that page it should show a red error toast that reads "WebVR supported, but no VRDisplays found." if the promise resolves correctly. You can also try the API via the inspector as you did above.
Components: Blink>WebXR

Sign in to add a comment