xr.requestDevice() errs other than expected based on spec. |
||||||||
Issue descriptionUserAgent: 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
,
Feb 9 2018
,
Feb 9 2018
,
Feb 12 2018
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.
,
Feb 12 2018
,
Feb 12 2018
,
Feb 12 2018
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.
,
Feb 13 2018
Actually, it looks like I was in the wrong browser. Canary should have yellow chrome or something. Closing out. Works as intended.
,
Feb 14 2018
,
Jul 4
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by ajha@chromium.org
, Feb 9 2018