New issue
Advanced search Search tips

Issue 810542 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-VR
Proj-XR


Participants' hotlists:
XR-Bugs


Sign in to add a comment

xr.requestDevice() errs other than expected based on spec.

Project Member Reported by jmedley@google.com, Feb 8 2018

Issue description

UserAgent: Mozilla/5.0 (Linux; Android 8.1.0; Pixel 2 Build/OPM1.1710119.019) AppleWebKit/537.36 (KHTML, Like Gecko) Chrome/66.0.3344.0 Mobile Safari/537.36

Steps to reproduce the problem:
1. Call navigator.xr.requestDevice() when no devices is available.
2. Chrome throws 'webxr.js:7 Uncaught TypeError: Cannot read property 'requestDevice' of undefined'

What is the expected behavior?
requestDevice() returns a promise that rejects with a NotFoundError. https://heycam.github.io/webidl/#notfounderror

What went wrong?
Chrome and the spec are out of sync. I actually don't know which is correct.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 66.0.3344.0  Channel: canary
OS Version: Android 8.1.0
Flash Version: 

Here's my experiment code. https://github.com/jpmedley/web-experiments/blob/master/webxr/webxr.js
 

Comment 1 by ajha@chromium.org, Feb 9 2018

Labels: Needs-Triage-M66
Components: Blink>WebVR
Owner: bajones@chromium.org
Status: Assigned (was: Unconfirmed)
I was using an attached Pixel with port forwarding when I hit this error. I should have changed the user agent and version information from those auto-supplied by the browser where I created the ticket.
Description: Show this description
Labels: -OS-Mac OS-Android
It sounds as if you don't have WebXR enabled on the browser in question? The error indicates that the navigator.xr object doesn't exist, which is a sign that the API hasn't been enabled.

On Chrome Canary make sure that the "WebXR Device API" flag is set to "Enabled" on the about:flags page, then try your code again. As a sanity check you can also try the samples at https://immersive-web.github.io/webxr-samples/, which are known to work with Chrome's implementation.  
Status: WontFix (was: Assigned)
Actually, it looks like I was in the wrong browser. Canary should have yellow chrome or something.

Closing out. Works as intended.
Labels: Test-Complete
Components: Blink>WebXR

Sign in to add a comment