If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[B2G] [Bluetooth] "Unable to Pair" message has placeholder text.

RESOLVED FIXED

Status

Firefox OS
Gaia::Settings
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Darren, Assigned: eragonj)

Tracking

(Blocks: 1 bug, {regression})

unspecified
ARM
Gonk (Firefox OS)
regression
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:koi+, b2g-v1.2 fixed, b2g-v1.3 fixed)

Details

(Whiteboard: burirun1, good first bug, burirun4)

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
Created attachment 801737 [details]
placeholder error.jpg

Description:
After failing to pair with a device via Bluetooth, the message that is displayed looks like it has placeholder text: 
"The page at app://settings.gaiamobile.org says: Unable to pair devices"

Repro Steps:
1. Load Buri Build ID: 20130906040204
2. Open the Settings app
3. Navigate to the Bluetooth screen
4. Turn on Bluetooth on two devices
5. Toggle on "Visible to all" on another device
6. Search for the device
7. After the device can be seen turn off Bluetooth on the device that is visible
8. Tap on the device to try and pair

Actual Results:
The message that is displayed is: 
"The page at app://settings.gaiamobile.org says: Unable to pair devices"

Expected Results:
"Unable to pair devices" will be displayed.

Environmental Variables
Gecko: http://hg.mozilla.org/mozilla-central/rev/ab5f29823236
Gaia: 94e5f269874b02ac0ea796b64ab995fce9efa4b3
Platform Version: 26.0a1
(Reporter)

Comment 1

4 years ago
Looks like both messages for failing to connect, are displaying incorrectly.

"The page at app://settings.gaiamobile.org says: 
Unable to pair devices"

"The page at app://settings.gaiamobile.org says: 
Unable to pair devices 
Unable to pair devices. Check that the PIN is correct."
This should be an UX/UI issue. Reset the component to Gaia::Settings.
Component: Bluetooth → Gaia::Settings
This could be a good-first-bug.
Whiteboard: burirun1 → burirun1, good first bug

Updated

4 years ago
Keywords: regression
Hi Alive,

I just found this problem was caused by system/modal_dialog.js. You can check the link below : 

https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/modal_dialog.js#L187

Because there is no way to assign title for prompts, after some tests, it seems that evt.detail.title will be assigned a system wording for it. I think we can check the origin value first and if it is "window", we can set the title to empty string to avoid this problem ( and will not affect somewhere using ModalDialog.alert() method )

Any ideas ?
Flags: needinfo?(alive)
As you said.

I wonder why title is set to 'This page says...'. There's no title value before.
Flags: needinfo?(alive)
This is a regression from https://github.com/mozilla-b2g/gaia/commit/124efab2a7bd71861ad3b00f17eaa884a4300974
In mozbrowser prompt service, it has a title field in the event detail which was never used before. But the patch above accidentally brought this field back.

http://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementPromptService.jsm#34
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#5446
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#5273
https://mxr.mozilla.org/mozilla-central/source/toolkit/locales/en-US/chrome/global/commonDialogs.properties#20

The actual problem is (1) we don't need this title (2) we don't need b2g gecko to translate the string for us.

I wonder there's a way to remove all the translation resource from b2g.
Hi, do you want to take this?
A simple six is as your comment.
Flags: needinfo?(ejchen)
Hi @Alive,

I think the quickfix would be fine, but we still need someone's help to clean the translation later.

I will take it !

THanks.
Flags: needinfo?(ejchen)
Assignee: nobody → ejchen
Created attachment 805121 [details]
Pointer to Github pull request 12234.html

Hi Alive, 

I just added the fix, please help me review the change. THanks
Attachment #805121 - Flags: review?(akuo)
Comment on attachment 805121 [details]
Pointer to Github pull request 12234.html

r+
BTW please reach me by alive@mozilla.com next time.
Attachment #805121 - Flags: review?(akuo) → review+
@Alive,

Because I search the phonebook for your email, that's why I typed the old one. 

I will reach you with your new email if I need any help later.

Thanks!
Blocks: 916658
Merged on Gaia/master:  bda5c4a902793934467b689a118a2c68f745706e
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Depends on: 916895
That causes :
E/GeckoConsole( 3253): [JavaScript Error: "TypeError: target is null" {file: "app://system.gaiamobile.org/js/modal_dialog.js" line: 207}]

when trying to add a ev.me wrapped app on the homescreen. That needs a backout
backout commit: 678c1d2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It seems that the wrapper will called ModalDialog.selectOne and will not have target value. I will check target to make sure that it has real value.
Created attachment 806418 [details]
Pointer to Github pull request 12286.html

Hi Alive, 

There is a missing check to make sure target is available. This case will happen when the others access through showWithPseudoEvent. Thanks for your great help again.
Attachment #806418 - Flags: review?(alive)
Attachment #806418 - Flags: review?(alive) → review+
This wasn't backed out on the 1.2 branch apparently. Can you back it out 1.2 as well?
Flags: needinfo?(jhford)
[v1.2 782a4ed] Revert "Merge pull request #12234 from EragonJ/bug-914317"
Flags: needinfo?(jhford)
EJ, Alive, can you guys add a unit test to this before merging the fixed into master?   We want to avoid silly regressions like this next time.

Updated

4 years ago
Flags: needinfo?(ejchen)
Hi Tony,

I will add some tests for this bug later.

Thanks for your reminding.
Flags: needinfo?(ejchen)
QA Contact: wachen
Comment on attachment 806418 [details]
Pointer to Github pull request 12286.html

Hi Alive, 

I just added the Unit tests for this bug and got green light from Travis. 

Please kindly review my PR again. 

Thanks!!
Attachment #806418 - Flags: review+ → review?(alive)
Comment on attachment 806418 [details]
Pointer to Github pull request 12286.html

See github
Attachment #806418 - Flags: review?(alive)
Comment on attachment 806418 [details]
Pointer to Github pull request 12286.html

Hi alive, 

I have followed your recommendations and updated the code. 

Please check the github again, thanks.
Attachment #806418 - Flags: review?(alive)
Comment on attachment 806418 [details]
Pointer to Github pull request 12286.html

r=me thanks
Attachment #806418 - Flags: review?(alive) → review+

Comment 25

4 years ago
Landed on master: fb4fd23a83ca439d317238e8cba0d72d13990d44
Thanks all.
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
Resolution: --- → FIXED
Duplicate of this bug: 929558
Can someone nominate this for approval for 1.2?
This issue still occurs on Buri v 1.2.0 COM RIL 

Environmental Variables
Device: Buri v 1.2.0 COM RIL)
Build ID: 20131120004000
Gecko: http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/2d454e0de2ed
Gaia: 5ec2963fff60492c840707df8d8090f9908a5251
Platform Version: 26.0
RIL Version: 01.02.00.019.102 

The user sees the message "The page at app://settings.gaiamobile.org says:" appears when failing to pair with another device via Bluetooth.

Should a new issue be written for this or reopen this one?
Whiteboard: burirun1, good first bug → burirun1, good first bug, burirun4
(In reply to ktucker from comment #29)
> This issue still occurs on Buri v 1.2.0 COM RIL 
> 
> Environmental Variables
> Device: Buri v 1.2.0 COM RIL)
> Build ID: 20131120004000
> Gecko: http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/2d454e0de2ed
> Gaia: 5ec2963fff60492c840707df8d8090f9908a5251
> Platform Version: 26.0
> RIL Version: 01.02.00.019.102 
> 
> The user sees the message "The page at app://settings.gaiamobile.org says:"
> appears when failing to pair with another device via Bluetooth.
> 
> Should a new issue be written for this or reopen this one?

It's expected this happens on 1.2 - the patch wasn't uplifted to 1.2.
Duplicate of this bug: 949424
Duplicate of this bug: 949013
Duplicate bugs 949424 and 949013 have requested koi? for certification issue.
blocking-b2g: --- → koi?
blocking-b2g: koi? → koi+
status-b2g-v1.2: --- → affected
Hey John, could you have a look whether it uplifts cleanly?
Flags: needinfo?(jhford)
Uplifted fb4fd23a83ca439d317238e8cba0d72d13990d44 to:
v1.3 already had this commit
v1.2: ebebb20c5e49371708966971704d6922066c986c
status-b2g-v1.2: affected → fixed
status-b2g-v1.3: --- → fixed
Thanks all !

Updated

4 years ago
Duplicate of this bug: 949844
Flags: needinfo?(jhford)
You need to log in before you can comment on or make changes to this bug.