New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624745 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocked on:
issue 624017

Blocking:
issue 483344



Sign in to add a comment

bluetooth: startNotifications hangs on forever

Project Member Reported by fbeaufort@chromium.org, Jun 30 2016

Issue description

Chromium	53.0.2785.0 (Developer Build) (64-bit)
Revision	12d8289a3c40f7ad998962c07f35fdffb949ee94-refs/heads/master@{#403090}
OS	Mac OS X

What steps will reproduce the problem?
(1) Go to https://googlechrome.github.io/samples/web-bluetooth/notifications.html?service=battery_service&characteristic=battery_level
(2) Make sure the nearby BLE Peripheral Android app broadcasts Battery Service
(3) Click "Start Notifications"

What is the expected output?
Starting notifications should fail as there is currently a bug in the BLE Peripheral Android app that misses a Characteristic Descriptor. See https://github.com/WebBluetoothCG/ble-test-peripheral-android/issues/63

What do you see instead?
It hangs on forever.


Note that very few times (not sure why), it actually returns an error...
 
Screen Shot 2016-06-30 at 12.18.17 PM.png
187 KB View Download
Blocking: 483344

Comment 2 by ortuno@chromium.org, Jun 30 2016

Blockedon: 624017
*sigh* I was hoping the macOS API would handle this correctly...

Comment 3 by jlebel@chromium.org, Jun 30 2016

According to the log, the macOS API does return an error, and I do return an error to the rest of chromium:
https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm?sq=package:chromium&l=287
I was able to reproduce a couple of times. I'm still trying to reproduce reliably. I basically reload the page a couple of times and run garbage collection (by opening dev tools) a couple of times. After a couple of tries it breaks. I will investigate further tomorrow.
Owner: ortuno@chromium.org
Status: Started (was: Available)
Found the problem. Fix in: https://codereview.chromium.org/2115953002

Comment 6 by kran...@gmail.com, Jul 4 2016

I see this problem with SensorTag which has valid characteristics too. In the screen shot, breakpoints at 99 & 100 are triggered, line 102 is never called. 

This is with, Version 54.0.2787.0 (64-bit) on macOS
Screen Shot 2016-07-04 at 6.27.50 PM.png
87.0 KB View Download
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 6 2016

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

commit 7a941f9dd60b02e7b886b2774244ac5b04f1bf37
Author: ortuno <ortuno@chromium.org>
Date: Wed Jul 06 00:06:14 2016

bluetooth: Initialize start_notitications_in_progress_

This was causing StartNotifySession to hang randomly.

Also adds some logging to make sure we know what's happening.

BUG= 624745 

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

[modify] https://crrev.com/7a941f9dd60b02e7b886b2774244ac5b04f1bf37/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm

Status: Fixed (was: Started)

Comment 9 by ortuno@chromium.org, Jul 13 2016

Labels: Merge-Request-53

Comment 10 by dimu@google.com, Jul 13 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Project Member

Comment 11 by bugdroid1@chromium.org, Jul 13 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b13b2d6cebb95c981c91bfe02f687ccfdf262b4

commit 1b13b2d6cebb95c981c91bfe02f687ccfdf262b4
Author: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Date: Wed Jul 13 16:04:55 2016

bluetooth: Initialize start_notitications_in_progress_

This was causing StartNotifySession to hang randomly.

Also adds some logging to make sure we know what's happening.

BUG= 624745 

Review-Url: https://codereview.chromium.org/2115953002
Cr-Commit-Position: refs/heads/master@{#403831}
(cherry picked from commit 7a941f9dd60b02e7b886b2774244ac5b04f1bf37)

Review URL: https://codereview.chromium.org/2149623002 .

Cr-Commit-Position: refs/branch-heads/2785@{#103}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/1b13b2d6cebb95c981c91bfe02f687ccfdf262b4/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm

Labels: Needs-Feedback
Tried verifying the issue by following the below steps, but could not proceed.
ortuno@: Could you please help providing other info if it could be verified from TE end.

Steps followed:
---------------
1) enable-web-bluetooth on Mac 10.11.5 using chrome 53.0.2785.21
2) Paired bluetooth to an Android device(Nexus 5)
3) Navigated to the url https://googlechrome.github.io/samples/web-bluetooth/notifications.html?service=battery_service&characteristic=battery_level
4) Clicked on start notification
5) Observed there is no device in the pop-up windows.
6) Live output was "Requesting Bluetooth Device..."
624745_July_19.mp4
1.8 MB View Download
Thanks for trying it out! As explained in the Test Plan[1], you need a Nexus 6, 6p, 5x or 9, to be running the Peripheral app in order to test this feature.

https://docs.google.com/document/d/1jo2QyknDBsM_-nzqgdE9o0ZPR76DbHNZStXo2L5AjbM/edit#heading=h.ef8wqs9z8v4b
Based on comment#13 the verification need Android devices which aren't available with Chrome Desktop team. ortuno@ is it possible to check this at your end please.
Status: Verified (was: Fixed)
Was not able to reproduce on 53.

Sign in to add a comment