Closed
Bug 1014924
Opened 11 years ago
Closed 11 years ago
[B2G][Tarako][Geolocation] WifiWorker scan fails With wifi off, and geolocation stops
Categories
(Core :: General, defect)
Tracking
()
People
(Reporter: garvan, Assigned: vchang)
References
Details
(Whiteboard: geolocation, mozilla location services)
Attachments
(2 files)
|
183.87 KB,
text/plain
|
Details | |
|
1010 bytes,
patch
|
chucklee
:
review+
|
Details | Diff | Splinter Review |
Setup: SIM in slot 2, wifi off (cell data on or off, same result)
Get this error in logcat:
W/WifiHW ( 85): wifi_command: SCAN
W/WifiHW ( 85): wifi_command: DRIVER SCAN-ACTIVE
W/WifiHW ( 85): wifi_command: DRIVER SCAN-PASSIVE
W/WifiHW ( 85): wifi_command: SCAN
W/WifiHW ( 85): wifi_command: DRIVER SCAN-PASSIVE
E/GeckoConsole( 85): [JavaScript Error: "this.wantScanResults is undefined" {file: "jar:file:///system/b2g/omni.ja!/components/WifiWorker.js" line: 2503}]
Summary: [B2G][Tarako][Geolocation] WifiWorker scan fails → [B2G][Tarako][Geolocation] WifiWorker scan fails With wifi off, and geolocation stops
Updated•11 years ago
|
blocking-b2g: --- → 1.3T?
Comment 1•11 years ago
|
||
NO : naoki to confirm if he can reproduce this and help comment if its a recent regression ? Would be helpful to understand if 1.4/2.0 are affected as well.
Basically help verify if geolocation works on the device when wifi is off(Cell data on and off).
Flags: needinfo?(nhirata.bugzilla)
Keywords: qawanted
Comment 2•11 years ago
|
||
(In reply to Garvan Keeley [:garvank] from comment #0)
> Setup: SIM in slot 2, wifi off (cell data on or off, same result)
>
> Get this error in logcat:
> W/WifiHW ( 85): wifi_command: SCAN
> W/WifiHW ( 85): wifi_command: DRIVER SCAN-ACTIVE
> W/WifiHW ( 85): wifi_command: DRIVER SCAN-PASSIVE
> W/WifiHW ( 85): wifi_command: SCAN
> W/WifiHW ( 85): wifi_command: DRIVER SCAN-PASSIVE
> E/GeckoConsole( 85): [JavaScript Error: "this.wantScanResults is
> undefined" {file: "jar:file:///system/b2g/omni.ja!/components/WifiWorker.js"
> line: 2503}]
Can you help comment the buildid details you are using?
I build with this:
BRANCH=v1.3t ./config.sh tarako
./build.sh gecko && ./flash.sh gecko
My git info is:
## Remote URLs:
origin https://github.com/mozilla-b2g/B2G.git (fetch)
origin https://github.com/mozilla-b2g/B2G.git (push)
## Remote Branches:
origin/HEAD -> origin/master
origin/master
## Local Branches:
* master
## Most Recent Commit:
commit 7f3e85bd996830ffb0b00ecab80ebf9b9ec2d2ae
Merge: 6b93981 d163526
Comment 4•11 years ago
|
||
I was NOT able to reproduce this on today's Tarako Build - Following the STR I did not receive the posted error message in my Logcat.
Environmental Variables:
Device: Tarako 1.3T
BuildID: 20140523081121
Gaia: 44aeb45296737299a988b4d91e3f0c1059caec08
Gecko: 25248a151dfa
Version: 28.1
Firmware Version: sp6821a-gonk-4.0-5-12
Keywords: qawanted
That is good news, same for me. I got my device reflashed with build 20140521183500. Now the bug doesn't occur, but I can't shut off wireless scanning, so I don't see how I can repro it. The wireless stays on, and shows networks.
I think if the code changes to shut off wireless completely when wireless is turned off in the settings, I would think the bug will re-occur.
Updated•11 years ago
|
blocking-b2g: 1.3T? → ---
B2G background wifi scanning is discussed here
https://bugzilla.mozilla.org/show_bug.cgi?id=807148
If there is a change to allow disabling of the wifi scanning (Android 4.4.3 has an option to do this in the Wifi Settings [under Advanced settings]), then the bug will reoccur.
Closing as it no longer is reproducible with the wifi scanning always active.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Comment 8•11 years ago
|
||
I can reproduce this bug on the 5/29 nightly on Tarako.
To reproduce I enable my data connection and disable wifi, then launch the Camera app (which requests geolocation) and watch the logcat.
I see a lot of geolocation logging and after about 25 seconds I start to see:
[JavaScript Error: "this.wantScanResults is undefined" {file: "jar:file:///system/b2g/omni.ja!/components/WifiWorker.js" line: 384}]
in the logcat. When I exit the camera app, I see the location provider shut down, but these WifiWorker.js error messages continue to appear every few seconds for about 25 seconds.
NetworkLocationProvider.js is querying wifi access points every 5 seconds. I assume that the queries are being queued up and are timing out after about 25s. After they timeout, they're causing this JS error. The error itself is probably benign, but the fact that we are aren't just failing fast when wifi is turned off seems wrong.
We should presumably fix the bad JS in WifiWorker.js, but maybe NetworkLocationProvider.js could also be modified to not query access points if wifi is disabled? Or the API for querying those points could fail fast instead when disabled?
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I'm hoping bug 1007953 might help resolve this issue? I asked in the bug if the fix there would fix the error message.
Flags: needinfo?(nhirata.bugzilla)
Updated•11 years ago
|
Flags: needinfo?(nhirata.bugzilla)
To note, I haven't gotten the error message. I have gotten a lot of command rejected error messages. You can also see the geolocation call in the log.
This is with wifi and mobile data turned off on a tarako with a full flash from today.
| Reporter | ||
Comment 11•11 years ago
|
||
bug 1007953 shouldn't have any effect on this bug.
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → vchang
| Assignee | ||
Comment 12•11 years ago
|
||
I think the API for querying those access points should return an error when wifi is disabled.
Maybe we should modify the API in nsIWifi.idl to
0 : success
-1 : wifi is disable or any kind of errors.
int getWifiScanResults(in nsIWifiScanResultsReady callback);
| Assignee | ||
Comment 13•11 years ago
|
||
Prevent calling the getWifiScanResults API when wifi is turned off.
Attachment #8434039 -
Flags: review?(chulee)
Comment on attachment 8434039 [details] [diff] [review]
Patch v1.0
Review of attachment 8434039 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thanks!
Attachment #8434039 -
Flags: review?(chulee) → review+
| Assignee | ||
Comment 15•11 years ago
|
||
| Assignee | ||
Comment 16•11 years ago
|
||
Not sure if we need this on Tarako per comment 8?
blocking-b2g: --- → 1.3T?
Comment 17•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment 18•11 years ago
|
||
Vincent, are there end user impact if we don't take this bug for tarako? thanks
Flags: needinfo?(vchang)
| Assignee | ||
Comment 19•11 years ago
|
||
I think user doesn't notice the bug. Just that there might be some error messages in the console.
Flags: needinfo?(vchang)
Updated•11 years ago
|
Actually, I think the end user impacts is a bit more than just not getting an error. Doesn't it continue trying process the ping without this patch? Since there's limited resources on Tarako, it may be beneficial for this patch to be in place if they don't have wifi on.
NI? James, so that he's aware of this patch that has not landed on 1.3T
I think we should take the patch. It seems low risk to me. vchang, can you verify please?
Flags: needinfo?(vchang)
Flags: needinfo?(james.zhang)
Comment 21•11 years ago
|
||
Zhenqing, please verify it.
I think it's low risk, we can land it.
Flags: needinfo?(james.zhang) → needinfo?(zhenqing.liu)
Comment 22•11 years ago
|
||
Verified OK, please land it on v1.3t, thanks.
| Assignee | ||
Comment 24•11 years ago
|
||
ok, I'll prepare the patch for 1.3T. But I don't have the tarako device at home right now. So let me do it on Monday.
Flags: needinfo?(vchang)
| Assignee | ||
Comment 25•11 years ago
|
||
I found the patch is also applicable to 1.3t branch. It's not necessary to post the specific patch.
Comment 26•11 years ago
|
||
I think Fabrice is back now, can you help to land this patch for v1.3t?
Flags: needinfo?(fabrice)
Comment 27•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•