[1.4] Geolocation: geo.wifi.logging.enabled not respected, can't get logs

RESOLVED FIXED in Firefox 32, Firefox OS v1.4

Status

Firefox OS
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: garvan, Assigned: garvan)

Tracking

unspecified
2.0 S6 (18july)
All
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:1.4+, firefox31 wontfix, firefox32 fixed, firefox33 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
This patch is not in 1.4, which provides a UI switch to turn on MLS geolocation logs: bug 1011410.

There is a a preference in NetworkGeolocationProvider.js that is supposed to turn on logging, it is no longer working. Without logs on geolocation bugs, they are extremely difficult to fix.

Previously, to turn on logging on b2g one could do the following:
adb root
adb pull /system/b2g/defaults/pref/user.js .
echo 'pref("geo.wifi.logging.enabled", true);' >> user.js 
adb remount
adb push user.js /system/b2g/defaults/pref
adb shell sync && adb reboot

The preference is still in the code, it is just not being respected:
http://mxr.mozilla.org/mozilla-b2g30_v1_4/source/dom/system/NetworkGeolocationProvider.js
Blocks: 1024099
status-b2g-v1.4: --- → affected
status-b2g-v2.0: --- → fixed
Depends on: 1011410
Hardware: x86 → All
(Assignee)

Comment 1

4 years ago
Looks like this patch caused it: https://bugzilla.mozilla.org/show_bug.cgi?id=1022279

This code is causing the pref to set back to false on startup:
http://mxr.mozilla.org/mozilla-b2g30_v1_4/source/dom/system/NetworkGeolocationProvider.js#140,

if (name == SETTINGS_DEBUG_ENABLED) should be changed to
if (name == SETTINGS_DEBUG_ENABLED && !gLoggingEnabled) 

On startup of this provider, let the js pref override the UI setting.
(Assignee)

Comment 2

4 years ago
Created attachment 8453134 [details] [diff] [review]
1036110-Stop-UI-setting-from-overriding-js-prefs.patch

On startup, stop the B2G UI setting from overriding the js prefs setting, and  turning off logging. If gLoggingEnabled is already on during startup, that means it was set in js prefs. Doug, you were involved in prefs stuff in this file recently, marking it for your review.
Attachment #8453134 - Flags: review?(dougt)

Updated

4 years ago
Attachment #8453134 - Flags: review?(dougt)
Attachment #8453134 - Flags: review+
Attachment #8453134 - Flags: approval-mozilla-b2g30+

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/b2g-inbound/rev/d7078fde6b33

Garvan says this affects all branches, so setting status flags accordingly.
Assignee: nobody → gkeeley
blocking-b2g: --- → 1.4?
status-b2g-v2.0: fixed → affected
status-b2g-v2.1: --- → affected
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d7078fde6b33
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S6 (18july)
https://hg.mozilla.org/releases/mozilla-aurora/rev/2ace7164be11
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/2b648cedfc83
status-b2g-v1.4: affected → fixed
status-b2g-v2.0: affected → fixed
status-b2g-v2.1: affected → fixed
status-firefox31: --- → wontfix
status-firefox32: --- → fixed
status-firefox33: --- → fixed

Updated

4 years ago
blocking-b2g: 1.4? → 1.4+
You need to log in before you can comment on or make changes to this bug.