Closed
Bug 1144623
Opened 9 years ago
Closed 9 years ago
[Shinano][Aries] Inconsistent WiFi state reported: connecting in statusbar, connected in Settings app
Categories
(Firefox OS Graveyard :: Wifi, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
FxOS-S8 (02Oct)
People
(Reporter: gerard-majax, Assigned: hchang)
References
Details
(Keywords: foxfood, polish)
Attachments
(5 files, 3 obsolete files)
STR:
0. Try to connect to Mozilla Guest (or other networks)
Expected:
Statusbar icon and Settings app status are in sync
Actual:
Statusbar icon shows the "Connecting" animation, while Settings apps shows we are connected.
Trying to reach a webpage results in "No network" error reported.
> $ adb shell netcfg
> wlan0 UP 169.254.174.135/16 0x00001043 00:90:4c:c5:12:38
So we have an IPv4 autoconfig address ...
I have observed a lot of strange states transition on Z3 and Z3 Compact, related to WiFi. Sometimes, I could get the same status (i.e., Settings saying we are connected, statusbar showing Connecting) but with a real IPv4 address on Mozilla Guest (or others).
Reporter | ||
Comment 1•9 years ago
|
||
And It's not a manifestation of the statusbar update issue tracked by :gmarty, since the whole statusbar is synced properly.
Reporter | ||
Comment 2•9 years ago
|
||
Toggling airplane mode on/off, then retrying to connect, still failing according to statusbar, Settings app showing once Connected and then "Waiting for IP address".
Reporter | ||
Comment 3•9 years ago
|
||
Same kind of steps with wifi.debugging.enabled and network.debugging.enabled prefs set to true.
Reporter | ||
Comment 4•9 years ago
|
||
Rebooting does not help. Airplane mode does not help. Settings the property "ro.moz.wifi.unloaddriver" does not help. Forcing forgetting the network does not help.
Reporter | ||
Comment 5•9 years ago
|
||
Reporter | ||
Comment 6•9 years ago
|
||
So, that may be due to bug 1144637. I have flashed several devices with my pending PR for this one, including Etienne's device. If anyone wants to give a try to this too and confirm WiFi is no more flaky, that would be very useful.
Flags: needinfo?(mhenretty)
Flags: needinfo?(kgrandon)
Flags: needinfo?(etienne)
Flags: needinfo?(dietrich)
Flags: needinfo?(anygregor)
Comment 7•9 years ago
|
||
How do I flash with your changes to the shinano manifest repo to my z3c?
Reporter | ||
Comment 8•9 years ago
|
||
(In reply to Michael Henretty [:mhenretty] from comment #7) > How do I flash with your changes to the shinano manifest repo to my z3c? Apply to device/sony/shinano-common, then trash boot.img, system.img and root/ and system/ in out/target/product/aries/. Build and flash boot.img and system.img. Current report from people who tested are that bug 1144637 does indeed improve things.
Reporter | ||
Comment 9•9 years ago
|
||
So it looks like this was tied to bug 1144637. So, just FTR, please make sure you flash boot and system partition to fix bug 1144637.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Comment 11•9 years ago
|
||
(In reply to Alexandre LISSY :gerard-majax from comment #6) > So, that may be due to bug 1144637. I have flashed several devices with my > pending PR for this one, including Etienne's device. If anyone wants to give > a try to this too and confirm WiFi is no more flaky, that would be very > useful. A day and 3 wifi networks later still no issues :)
Flags: needinfo?(etienne)
Updated•9 years ago
|
Flags: needinfo?(anygregor)
Reporter | ||
Comment 13•9 years ago
|
||
So the bad WiFi issue was fixed but there are still inconsistencies as confirmed by myself and others on bug 1154690 comment 20.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Comment 14•9 years ago
|
||
Yeah, I'm still seeing things like Wifi not autoconnecting in recent builds.
Flags: needinfo?(dietrich)
I think bug 1177411 is related.
Blocks: 1177411
Assignee | ||
Comment 17•9 years ago
|
||
I remember 'some' the of inconsistency issue are because the events reported by wpa_supplicant are slightly different when switching network so that settings app incorrectly interprets the state of networks. It has been a long standing issue that the wifi event contains insufficient information for gaia to update the status as far as I know.
Flags: needinfo?(hchang)
Assignee | ||
Comment 18•9 years ago
|
||
(In reply to Henry Chang [:henry] from comment #17) > I remember 'some' the of inconsistency issue are because the events reported > by wpa_supplicant > are slightly different when switching network so that settings app > incorrectly interprets the > state of networks. It has been a long standing issue that the wifi event > contains insufficient > information for gaia to update the status as far as I know. By the way, the wifi state in the status bar seems always correct.
Updated•9 years ago
|
QA Whiteboard: [foxfood-triage]
Comment 19•9 years ago
|
||
Updated•9 years ago
|
Assignee: nobody → amchung
Comment 20•9 years ago
|
||
Dear Fred, would you help me to review this patch? Thanks!
Attachment #8634004 -
Attachment is obsolete: true
Attachment #8640368 -
Flags: review?(gasolin)
Comment 21•9 years ago
|
||
Comment on attachment 8640368 [details] [review] added statement on isConnected function. Thanks for providing patch! Please fix and add some unit test on wifi_utils_test.js or the treeherder will fail https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=6100855939c17b5a050fa7b7c11d2efe54539437
Attachment #8640368 -
Flags: review?(gasolin)
Comment 22•9 years ago
|
||
@amy if you need any help to finish the patch, please ping me. Or I can take it over and finish the unit test part.
Flags: needinfo?(amchung)
Comment 23•9 years ago
|
||
Fred, can you take this over if Amy doesn't have the time? Our wi-fi is pretty bad and it feels like it's only getting worse lately :( Let's try and land improvements like these in the 2.5 timeframe.
Flags: needinfo?(gasolin)
Comment 24•9 years ago
|
||
(In reply to Henry Chang [:henry] from comment #17) > I remember 'some' the of inconsistency issue are because the events reported > by wpa_supplicant > are slightly different when switching network so that settings app > incorrectly interprets the > state of networks. It has been a long standing issue that the wifi event > contains insufficient > information for gaia to update the status as far as I know. Henry, can you please file a bug for what you are describing here? If the design of the API prevents us from having wifi that works correctly, we should not allow it to be unfixed for so long. Wifi is a table-stakes feature - it *has* to work correctly or we cannot realistically expect people to use Firefox OS. If you know what is wrong, please jump quickly on making the change happen or working with others to do so :)
Flags: needinfo?(hchang)
Assignee | ||
Comment 25•9 years ago
|
||
(In reply to Dietrich Ayala (:dietrich) from comment #24) > (In reply to Henry Chang [:henry] from comment #17) > > I remember 'some' the of inconsistency issue are because the events reported > > by wpa_supplicant > > are slightly different when switching network so that settings app > > incorrectly interprets the > > state of networks. It has been a long standing issue that the wifi event > > contains insufficient > > information for gaia to update the status as far as I know. > > Henry, can you please file a bug for what you are describing here? If the > design of the API prevents us from having wifi that works correctly, we > should not allow it to be unfixed for so long. > > Wifi is a table-stakes feature - it *has* to work correctly or we cannot > realistically expect people to use Firefox OS. If you know what is wrong, > please jump quickly on making the change happen or working with others to do > so :) Hi Dietrich, You are right. I will discuss with current assignee and Fred to find out the best solution for this issue. Sorry for not taking care about this issue for a while :(
Flags: needinfo?(hchang)
Comment 26•9 years ago
|
||
Comment 27•9 years ago
|
||
I've made a patch with test cases, will discuss with Amy if we still need it before update the gecko wifi api.
Flags: needinfo?(gasolin)
Comment 28•9 years ago
|
||
Comment on attachment 8654725 [details] [review] [gaia] gasolin:issue-1144623 > mozilla-b2g:master @Amy @Evelyn could you help review this patch?
Attachment #8654725 -
Flags: review?(ehung)
Attachment #8654725 -
Flags: review?(amchung)
Assignee | ||
Comment 29•9 years ago
|
||
I am working on this bug and just got some idea.
Comment 30•9 years ago
|
||
Assignee | ||
Comment 31•9 years ago
|
||
This is my version of the patch. will discuss with Fred tmr. https://github.com/mozilla-b2g/gaia/pull/31632/files
Assignee | ||
Comment 32•9 years ago
|
||
After investigation, the newly created item will be misjudged as 'connected' in [1]. The reason behind is the function [2] has some issue: 1) We actually have a 'connected' property [3] and it does reflect the status correctly but that's not enough for displaying like 'connecting' or 'obtaining an IP address'. 2) MozWifiManager.connection.network may have 'associated', 'connecting' other than just 'connected' state. It's hard to say if it makes sense from API's point of view. So I tend to keep the current design. 3) So, if we are still connecting with certain network, it will be considered as "connected" because of (2). It would also happen on other devices and depends on when we are trying to create a wifi scan list. But why didn't we see the similar issue on like flame? The answer is there may be a "status update event" followed by the scan result to update the list we created with state shown to mitigate the wrong created state. Given the above findings, my solution is as simple as creating a scan result list with the correct status by adding a function getNetworkStatus to WifiHelper. The assumption behind is there would be at most one network with non-disconnected status. [1] https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/modules/wifi_utils.js#L94 [2] https://github.com/mozilla-b2g/gaia/blob/master/shared/js/wifi_helper.js#L80 [2] http://hg.mozilla.org/mozilla-central/file/fb720c90eb49/dom/webidl/MozWifiManager.webidl#l67
Assignee | ||
Comment 33•9 years ago
|
||
Comment on attachment 8655340 [details] [review] [gaia] elefant:bug/1144623-wifi-status > mozilla-b2g:master Hi Fred, Finally I got test case passed. Could you have a review on my patch? Thanks!
Attachment #8655340 -
Flags: review?(gasolin)
Comment 34•9 years ago
|
||
Comment on attachment 8654725 [details] [review] [gaia] gasolin:issue-1144623 > mozilla-b2g:master remove the review sign since Henry have taken it. Thanks Henry!
Attachment #8654725 -
Flags: review?(ehung)
Attachment #8654725 -
Flags: review?(amchung)
Updated•9 years ago
|
Assignee: amchung → hchang
Comment 35•9 years ago
|
||
Comment on attachment 8655340 [details] [review] [gaia] elefant:bug/1144623-wifi-status > mozilla-b2g:master Though I'm not understand how the status really changed, the code and on device test seems fine to me.
Attachment #8655340 -
Flags: review?(gasolin) → review+
Assignee | ||
Comment 36•9 years ago
|
||
Thanks for your review, Fred :)
Assignee | ||
Updated•9 years ago
|
Attachment #8640368 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8654725 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 37•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/fe5bd8f9a3dbef844eab1fe884a7637fff4d8bfd
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S8 (02Oct)
Updated•8 years ago
|
Flags: needinfo?(amchung)
You need to log in
before you can comment on or make changes to this bug.
Description
•