Closed Bug 869020 Opened 11 years ago Closed 11 years ago

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

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

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

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.1 --- wontfix

People

(Reporter: gsvelto, Assigned: ferjm)

References

()

Details

Attachments

(1 file)

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.
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: nobody → ferjmoreno
Attachment #745892 - Flags: review?(kaze)
Triage 5/8 - leo+ because when the bug is hit, wifi is unusable and recovery is not easy.
blocking-b2g: leo? → leo+
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)
See Also: → 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+
Thanks Alive!

https://github.com/mozilla-b2g/gaia/commit/3f766bccdd9c0961b33f2085089c1f575143bd8b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted 3f766bccdd9c0961b33f2085089c1f575143bd8b to:
v1-train: 913769b05882bb4faa448604b7fc6ea2e06c9c2d
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
QA Contact: amiller
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: