The wifi switch remains grayed out when hitting an error upon turning wifi on

RESOLVED FIXED

Status

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

People

(Reporter: gsvelto, Assigned: ferjm)

Tracking

unspecified
ARM
Gonk (Firefox OS)
Bug Flags:
in-moztrap +

Firefox Tracking Flags

(blocking-b2g:leo+, b2g18 fixed, b2g18-v1.0.1 wontfix)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
On my Unagi when flipping the wifi switch I see the following error in logcat:

E/GeckoConsole(  425): [JavaScript Error: "NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN: Cannot modify properties of a WrappedNative" {file: "app://settings.gaiamobile.org/js/wifi.js" line: 51}]

The offending line is visible here:

https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/wifi.js#L51

If I understand this correctly the |onerror| property of the |req| object is not being initialized properly preventing the error function to return control over the switch to the user.

To reproduce this issue on my Unagi I did the following:

1. Flash a fresh build (either v1-train or master).
2. Don't add a wifi network in the FTU (none appear to me as wifi is off by default apparently)
3. Go in the settings app, wifi panel
4. Flip the switch

The switch goes into the 'on' position but remains grayed out, no wifi networks appear as wifi is apparently still off. Tapping the switch again at this stage is useless as it will remain grayed out. Killing the settings app and restarting it reveals that wifi remained off and the issue repeats itself.

Restarting my Unagi seems to partially fix the problem; I can still see the error message in the log but now the switch eventually works.
(Reporter)

Comment 1

5 years ago
Turns out this is caused by misusing the value returned from nsIDOMSettingsManager.createLock() which returns an nsIDOMSettingsLock object and not a DOMRequest one (which would have the |onerror| property).
blocking-b2g: --- → leo?
Summary: The wifi switch remains grayed out when hitting a mozSettings error upon turning wifi on → The wifi switch remains grayed out when hitting an error upon turning wifi on
(Assignee)

Updated

5 years ago
Assignee: nobody → ferjmoreno
(Assignee)

Comment 2

5 years ago
Created attachment 745892 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9572/files

Pointer to Github pull-request
(Assignee)

Updated

5 years ago
Attachment #745892 - Flags: review?(kaze)
status-b2g18: --- → affected
status-b2g18-v1.0.1: --- → wontfix
Triage 5/8 - leo+ because when the bug is hit, wifi is unusable and recovery is not easy.
blocking-b2g: leo? → leo+
(Assignee)

Comment 4

5 years ago
Comment on attachment 745892 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9572/files

Moving the review to Alive, as he originally reviewed this code in bug 859993
Attachment #745892 - Flags: review?(kaze) → review?(alive)

Updated

5 years ago
See Also: → bug 869246
Comment on attachment 745892 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9572/files

r=me, my previous review failed :/ Thanks!
Attachment #745892 - Flags: review?(alive) → review+
(Assignee)

Comment 6

5 years ago
Thanks Alive!

https://github.com/mozilla-b2g/gaia/commit/3f766bccdd9c0961b33f2085089c1f575143bd8b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Uplifted 3f766bccdd9c0961b33f2085089c1f575143bd8b to:
v1-train: 913769b05882bb4faa448604b7fc6ea2e06c9c2d
status-b2g18: affected → fixed

Updated

5 years ago
Flags: in-moztrap?

Updated

5 years ago
Flags: in-moztrap? → in-moztrap+
QA Contact: amiller
You need to log in before you can comment on or make changes to this bug.