New issue
Advanced search Search tips

Issue 681998 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

navigator.bluetooth.requestDevice doesn't work

Reported by eazy...@gmail.com, Jan 17 2017

Issue description

<b>Chrome Version       : <Copy from: 'about:version'></b>
URLs (if applicable) : https://googlecodelabs.github.io/candle-bluetooth/
Other browsers tested:
  Opera FAIL

What steps will reproduce the problem?
(1) Follow instructions here: https://codelabs.developers.google.com/codelabs/candle-bluetooth/index.html?index=..%2F..%2Findex#1
(2) Navigate to https://googlecodelabs.github.io/candle-bluetooth/
(3) Press the green CONNECT button

What is the expected result?
`navigator.bluetooth.requestDevice` call should work

What happens instead?
Uncaught TypeError: Cannot read property 'requestDevice' of undefined
    at PlaybulbCandle.connect (playbulbCandle.js:21)
    at HTMLButtonElement.document.querySelector.addEventListener.event


Please provide any additional information below. Attach a screenshot if
possible.

 
Screen Shot 2017-01-17 at 5.04.26 PM.png
465 KB View Download

Comment 1 by ortuno@chromium.org, Jan 17 2017

What version of chrome are you using? You can navigate to about:version to see the version. Web Bluetooth is enabled on 56 by default.

Comment 2 by hdodda@chromium.org, Jan 18 2017

Labels: Needs-Feedback

Comment 3 by eazy...@gmail.com, Jan 18 2017

#1  I have Chromium 55.0.2883.95 (Official Build) (64-bit).

I was able to solve this problem by enabling bluetooth protocol in Chrome as described here https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web:

chrome://flags/#enable-web-bluetooth
Status: WontFix (was: Unconfirmed)
Thanks; that's the expected behavior.

Comment 5 by eazy...@gmail.com, Jan 18 2017

#4  So going forward, in Chrome one always has to enable the bluetooth protocol explicitly before connecting to BLE devices?
See comment #1.
For the record, I've just updated Origin Trials token so that you don't need to enable the flag until 2017-01-24. See https://github.com/googlecodelabs/candle-bluetooth/commit/cd5ed2f7d5bad63a3b179fb22d9afa578eadc5ba

Comment 8 by eazy...@gmail.com, Jan 19 2017

#7  According to a comment above:
~"Web Bluetooth is enabled on 56 by default"

How does updating Origin Trials token impact that fact?

Sign in to add a comment