Closed
Bug 932914
Opened 11 years ago
Closed 11 years ago
[B2G][Settings][Bluetooth] Bluetooth name is erased when turning device OFF/ON
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(blocking-b2g:koi+, firefox26 wontfix, firefox27 wontfix, firefox28 verified, b2g18 unaffected, b2g-v1.1hd unaffected, b2g-v1.2 verified)
Tracking | Status | |
---|---|---|
firefox26 | --- | wontfix |
firefox27 | --- | wontfix |
firefox28 | --- | verified |
b2g18 | --- | unaffected |
b2g-v1.1hd | --- | unaffected |
b2g-v1.2 | --- | verified |
People
(Reporter: sarsenyev, Assigned: gyeh)
References
Details
(Keywords: regression, Whiteboard: burirun3)
Attachments
(3 files, 2 obsolete files)
(deleted),
video/quicktime
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Description:
When turning Bluetooth OFF/ON, the device name will disappear, but still able to be connected with another device and recognized by the previous name
Device: Buri v1.2 COM RIL
BuildID: 20131025004000
Gaia: 606517ceafe0950c2b89822d5f13353743334f2c
Gecko: 5eabd267ef04
Version: 26.0a2
RIL Version: 01.02.00.019.082
Firmware Version: US_20131015
Notes:
Repro frequency: 100%
Like to the failed TC: https://moztrap.mozilla.org/manage/cases/?filter-id=6935
See attached: Video
The issue doesn't reproduce on the latest 1.1 COM RIL
Device: Leo 1.1 COM RIL
BuildID: 20131030041204
Gaia: 39b0203fa9809052c8c4d4332fef03bbaf0426fc
Gecko: 41c15ddb7216
Version: 18.0
Firmware Version:V10c
RIL Version: 01.01.00.019.264
status-b2g18:
--- → unaffected
status-b2g-v1.2:
--- → affected
Keywords: regression,
regressionwindow-wanted
Summary: [B2G][Settings][Bluetooth] Bluetooth name erased when turning device OFF/ON → [B2G][Settings][Bluetooth] Bluetooth name is erased when turning device OFF/ON
Steps to reproduce:
1) Open "Settings" from the home screen
2) Navigate into "Bluetooth"
3) Verify the "Bluetooth" has some name
4) Toggle the "Bluetooth" OFF and then return to "ON"
Updated•11 years ago
|
QA Contact: sparsons
Comment 5•11 years ago
|
||
This issue started to occur on Buri 1.2 Build ID: 20130827040201
Gaia 599214a0f41eece076dc83cd85f5b27f8cfe67f2
SourceStamp e42dce3209da
BuildID 20130827040201
Version 26.0a1
Last working Buri 1.2 Build ID: 20130826163255
Gaia 23343e6ea3cc59c3ab0ac9188aaa657bd11da4fd
SourceStamp 14b1e8c2957e
BuildID 20130826163255
Version 26.0a1
Keywords: regressionwindow-wanted
Comment 6•11 years ago
|
||
I don't understand what this bug is & what the impact of it is. Can you clarify this a bit better?
Flags: needinfo?(sarsenyev)
The issue is when the device has a name for an example "AAA" and a user is turning "Bluetooth" device OFF and then switching back to "ON", the Bluetooth's name disappears and the device name field is empty.
Flags: needinfo?(sarsenyev)
Comment 8•11 years ago
|
||
So if I understand this bug, flipping this pref off & on, we connect to the previous bluetooth headset, but the device name is reported as nothing.
blocking-b2g: --- → koi?
Comment 9•11 years ago
|
||
triage: koi+ for regression
Updated•11 years ago
|
blocking-b2g: koi? → koi+
Assignee | ||
Comment 11•11 years ago
|
||
I tested with the latest build for buri and it works well.
Gaia a788ea1a3e04716938bd41a559c36a831cf1190b
BuildID 20131030004003
Version 26.0a2
Add keyword "qawanted" for further verification. Thanks.
Keywords: qawanted
Assignee | ||
Comment 12•11 years ago
|
||
From the attached video, the device name is shown at the beginning of turning Bluetooth on. However, the name is erased somehow after a few seconds. Although I had no luck to reproduce it, it should be a gaia issue.
Assignee: gyeh → nobody
Component: Bluetooth → Gaia::Settings
Assignee | ||
Comment 13•11 years ago
|
||
I downloaded the build from pvt and tried to full flash my phone again (./flash.sh -f), and I found I can reproduce the bug... :|
Assignee | ||
Comment 14•11 years ago
|
||
I'd like to point out that no name is shown when enabling Bluetooth for the first time.
Comment 15•11 years ago
|
||
I was able to successfully reproduce this issue on Buri 1.2 Build ID: 20131031004003
Gaia df049e3177ced0ca493ff0d192c65f18392bb462
SourceStamp 93eafd042c1c
BuildID 20131031004003
Version 26.0
Bluetooth name is erased when turning bluetooth OFF then ON.
Keywords: qawanted
Comment 16•11 years ago
|
||
(In reply to Gina Yeh [:gyeh] [:ginayeh] from comment #14)
> I'd like to point out that no name is shown when enabling Bluetooth for the
> first time.
Well right, there's no bluetooth device paired with at that point. What's happening in this bug is bluetooth is being re-enabled, we pair with the device we paired with previously, but we lost the device name in the process.
Comment 17•11 years ago
|
||
Ian, could you talk to Gina and see if Settings app is at fault here?
Assignee: nobody → iliu
Flags: needinfo?(iliu)
Comment 18•11 years ago
|
||
Sure, I'm able to reproduce the issue on Mozilla-Central + Gaia/master. Trying to find out the root cause.
Flags: needinfo?(iliu)
Comment 19•11 years ago
|
||
Hi Gina,
After added some log in settings/js/bluetooth.js, there is no value in the "defaultAdapter.name" sometimes.
My steps as following:
1) Click "Rename my device" button and type in "ian-inari"
The value is set successfully. But I see an error log as following. I'm not sure that is relative with the issue.
========================================================================================================
E/GeckoConsole( 648): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [inIDOMUtils.setContentState]" {file: "chrome://global/content/BrowserElementPanning.js" line: 465}]
========================================================================================================
2) Re-enable Bluetooth from off to on. At this section, Gaia::settings app will setTimeout to get device name via "defaultAdapter.name" while doing initWithAdapter.
And sometimes there is no value in it.
========================================================================================================
E/GeckoConsole( 819): Content JS LOG at app://settings.gaiamobile.org/js/bluetooth.js:187 in initial/<: --> initial(): defaultAdapter.name =
========================================================================================================
Ref: https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/bluetooth.js#L186
Since the value is set successfully, I guess the issue might be happened at Gecko side.
Flags: needinfo?(gyeh)
Assignee | ||
Comment 20•11 years ago
|
||
Thanks, Ian.
(In reply to Ian Liu [:ianliu] from comment #19)
> 1) Click "Rename my device" button and type in "ian-inari"
> The value is set successfully. But I see an error log as following. I'm not
> sure that is relative with the issue.
> =============================================================================
> ===========================
> E/GeckoConsole( 648): [JavaScript Error: "NS_ERROR_FAILURE: Component
> returned failure code: 0x80004005 (NS_ERROR_FAILURE)
> [inIDOMUtils.setContentState]" {file:
> "chrome://global/content/BrowserElementPanning.js" line: 465}]
> =============================================================================
> ===========================
It doesn't like a related issue, so just ignore it ;)
> 2) Re-enable Bluetooth from off to on. At this section, Gaia::settings app
> will setTimeout to get device name via "defaultAdapter.name" while doing
> initWithAdapter.
> And sometimes there is no value in it.
> =============================================================================
> ===========================
> E/GeckoConsole( 819): Content JS LOG at
> app://settings.gaiamobile.org/js/bluetooth.js:187 in initial/<: -->
> initial(): defaultAdapter.name =
> =============================================================================
> ===========================
It makes sense to me. That's why the name is shown at the beginning and then erased. Let me check Gecko part and I'll keep you updated.
Flags: needinfo?(gyeh)
Assignee | ||
Comment 21•11 years ago
|
||
Seems like a timing issue :| Let me figure out a solution...
Thanks for your help again, Ian.
Assignee: iliu → gyeh
Component: Gaia::Settings → Bluetooth
Assignee | ||
Comment 22•11 years ago
|
||
Here's some details for Gecko part.
When turning on Bluetooth, BluetoothManager.GetDefaultAdapter() is invoked and this async call returns an instance of adapter with all attributes including Name.
The implementation of GetDefaultAdapter could be divided into parts:
1. Get the object path of default adapter from BlueZ first
2. Query all properties of the adapter.
3. Create an instance of adapter with these properties.
4. Receive event PropertyChange with correct adapter name and update values of all instances of adapter.
Note that, in step 2, the property name returned by BlueZ is always null.
Assignee | ||
Comment 23•11 years ago
|
||
I'd like to correct the last sentence in comment 22.
The property name returned by BlueZ is *sometimes* null.
If we received event PropertyChange before querying all properties, the name would be correct.
(4 -> 1 -> 2 -> 3)
Comment 24•11 years ago
|
||
Yes, the symptom is happened sometimes in comment 19.
Assignee | ||
Comment 25•11 years ago
|
||
I think the issue is emerged after landing bug 923647.
It's not the root cause, and we still need to figure out a solution.
Assignee | ||
Comment 26•11 years ago
|
||
The problem occurred in the following sequence:
1 -> 2 (the adapter name is null) -> 4 -> 3 (create an adatper with null name)
When we received event PropertyChange, we broadcast the message to all instances of adapter. However, no instance is created at that time. So, the message is just ignored.
Assignee | ||
Comment 27•11 years ago
|
||
I think we can hold those PropertyChange events for a while and then broadcast. What do you think, Eric?
Flags: needinfo?(echou)
Updated•11 years ago
|
Target Milestone: --- → 1.3 Sprint 5 - 11/22
Assignee | ||
Comment 28•11 years ago
|
||
I can reproduce it on unagi with debug build.
Updated•11 years ago
|
Target Milestone: 1.3 Sprint 5 - 11/22 → 1.2 C5(Nov22)
Assignee | ||
Comment 29•11 years ago
|
||
To sum, I can reproduce this issue on both Buri and Unagi. It can easily reproduce with debug build of V1.2 and V1.3. The repro frequency is about 50%.
When I flashed unagi with debug build of V1.1(b2g18). The issue is quite hard to repo. Tried 20 times and had no luck to reproduce.
Assignee | ||
Comment 30•11 years ago
|
||
The result described in comment 29 reminds me that bug 906019 may change the behaviour of our stack a little bit.
Originally, we got adapter properties with a blocking call, and then received PropertyChanged with correct adapter name after the blocking call is finished. At that time, an instance of adapter is created in content process, and the signal PropertyChanged is broadcasted to content process, too. So, the adapter name is updated successfully.
After applying changes in bug 906019, the blocking call is replaced with a non-blocking call. The event PropertyChanged is received and broadcasted before the instance of adapter is created in content process. So we failed to update adapter name.
Assignee | ||
Comment 31•11 years ago
|
||
I reverted the changes in bug 906019, that is, getting the adapter properties with a blocking call, and the reproduce rate is decreased to 30%.
Comment 32•11 years ago
|
||
(In reply to Gina Yeh [:gyeh] [:ginayeh] from comment #31)
> I reverted the changes in bug 906019, that is, getting the adapter
> properties with a blocking call, and the reproduce rate is decreased to 30%.
Hey :gyeh, just a quick follow up on where we are at this ? Is there a WIP patch here ? I am wondering if its a timing issue, could we add some delay mechanism in here if fixing this fully seems too hard ?
Assignee | ||
Comment 33•11 years ago
|
||
Hi bajaj, the patch is coming. After discussing with Eric and Marco, we came up a solution ;)
Comment 34•11 years ago
|
||
Discussed with Gina about this issue yesterday. She will send a patch soon.
Flags: needinfo?(echou)
Assignee | ||
Comment 35•11 years ago
|
||
Attachment #8334337 -
Flags: review?(echou)
Assignee | ||
Comment 36•11 years ago
|
||
Patch updated.
Attachment #8334337 -
Attachment is obsolete: true
Attachment #8334337 -
Flags: review?(echou)
Attachment #8334339 -
Flags: review?(echou)
Comment 37•11 years ago
|
||
Comment on attachment 8334339 [details] [diff] [review]
Patch 1(v2): Broadcast AdapterAdded after adapter name is updated
Review of attachment 8334339 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM. Thanks.
Attachment #8334339 -
Flags: review?(echou) → review+
Assignee | ||
Comment 38•11 years ago
|
||
Attachment #8334339 -
Attachment is obsolete: true
Assignee | ||
Comment 39•11 years ago
|
||
Comment 40•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 41•11 years ago
|
||
status-b2g-v1.1hd:
--- → unaffected
status-firefox26:
--- → wontfix
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
Assignee | ||
Comment 44•11 years ago
|
||
I just found that the patch wasn't successfully pushed into branch v1.2, and comment 41 is an empty changeset. So, I'm going to re-open this bug and attach a patch for branch v1.2 later.
Assignee | ||
Updated•11 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 45•11 years ago
|
||
Flags: needinfo?(ryanvm)
Assignee | ||
Comment 46•11 years ago
|
||
Ryan, could you help to push the patch to branch v1.2?
Keywords: checkin-needed
Assignee | ||
Comment 47•11 years ago
|
||
Seems like Ryan is on vacation.
Tomcat, can you help?
Flags: needinfo?(cbook)
Comment 48•11 years ago
|
||
Hi Gina, talked with Ed and he will take care of the checkin-needed bugs
Flags: needinfo?(ryanvm)
Flags: needinfo?(emorley)
Flags: needinfo?(cbook)
Comment 49•11 years ago
|
||
I don't have this repo checked out at the moment, but will try to get to the checkin-neededs in general over the next few days :-)
Flags: needinfo?(emorley)
Comment 50•11 years ago
|
||
For the sake of tracking, I'm close this but switch the 1.2 flag to affected to indicate this needs an uplift.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 51•11 years ago
|
||
Yikes, don't know how that happened. Sorry :(
https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/8cc240005acc
Keywords: checkin-needed
Assignee | ||
Comment 52•11 years ago
|
||
Thank you all, guys.
Comment 53•11 years ago
|
||
Verified that the bluetooth device name does not disappear after reactivating it on 1.2 and 1.3
1.2 Environmental Variables:
Device: Buri v1.2 COM RIL
BuildID: 20131204004003
Gaia: 8d762f3376318fd6be390432db750ae4904c9ab6
Gecko: 758f3fb32dda
Version: 26.0
Firmware Version: V1.2_20131115
1.3 Master Environmental Variables
Device: Buri v1.3 COM RIL
Build ID: 20131203040236
Gecko: 8648aa476eef
Gaia: 31808a29cfcffa584b6a88b4f1e515387f485a1b
Platform Version: 28.0a1
RIL Version: 01.02.00.019.102
Firmware Version: v1.2_20131115
You need to log in
before you can comment on or make changes to this bug.
Description
•