Closed Bug 1355795 Opened 8 years ago Closed 8 years ago

about:preferences#privacy is broken with browser.cache.offline.enable=false

Categories

(Firefox :: Settings UI, defect)

55 Branch
x86_64
Linux
defect
Not set
major

Tracking

()

VERIFIED FIXED
Firefox 55
Tracking Status
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 + verified

People

(Reporter: jan, Assigned: Fischer)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached image privacy-settings-broken.png (deleted) β€”
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170412100254

Steps to reproduce:

https://hg.mozilla.org/mozilla-central/rev/f40e24f40b4c4556944c762d4764eace261297f5
Since today or yesterday.
Go on about:preferences
click on "Privacy and Security". nothing happens.
Click on Updates. I see the Updates page.
I click on Privacy & Security and see something mixed (see screenshot).
You can see that my main browser (left side) has this problem, while my "more default" (right side) profile hasn't this problem.
Severity: normal → major
Component: Untriaged → Preferences
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
I can't reproduce it with FF55 on Win 7.
1) Clicking on "Privacy and Security" loads about:preferences#privacy and displays the privacy & security settings.
2) Clicking on "Updates" loads about:preferences#advanced and displays the options about updates.
Woah, I've found it!
On the screenshot you see "offline web contents" on top left (or what the back translation might be):

Left Profile: user_pref("browser.cache.offline.enable", false);
Right Profile: default: true

So if browser.cache.offline.enable is false, everything else than "offline web contents" is hidden. I wouldn't hide that section anyway.
Indeed.
Summary: about:preferences#privacy Privacy & Security is broken → about:preferences#privacy is broken with browser.cache.offline.enable=false
STR:

1) Set browser.cache.offline.enable=false (restart Firefox maybe)
2) Switch between "Privacy and Security" and "Updates" in Options

Reg range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=596ea55fa962c
aa18ff1a5761fdccc58ef6a289c&tochange=4f90a5f5fb164f31b77ae71b216cd968570eb97a

Fischer.json β€” Bug 1309123 - Show persistent-storage permission request notification, r=florian

Fischer, could you check this regression from your bugfix, please.
Blocks: 1309123
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
Flags: needinfo?(fliu)
Keywords: regression
(In reply to Loic from comment #4)
> STR:
> 
> 1) Set browser.cache.offline.enable=false (restart Firefox maybe)
> 2) Switch between "Privacy and Security" and "Updates" in Options
> 
> Reg range:
> https://hg.mozilla.org/integration/autoland/
> pushloghtml?fromchange=596ea55fa962c
> aa18ff1a5761fdccc58ef6a289c&tochange=4f90a5f5fb164f31b77ae71b216cd968570eb97a
> 
> Fischer.json β€” Bug 1309123 - Show persistent-storage permission request
> notification, r=florian
> 
> Fischer, could you check this regression from your bugfix, please.
OK, and just have a quick look, by default browser.cache.offline.enable=true [1].
[1] https://dxr.mozilla.org/mozilla-central/rev/f40e24f40b4c4556944c762d4764eace261297f5/modules/libpref/init/all.js#98
(In reply to Loic from comment #4)
> STR:
> 
> 1) Set browser.cache.offline.enable=false (restart Firefox maybe)
> 2) Switch between "Privacy and Security" and "Updates" in Options
> 
> Reg range:
> https://hg.mozilla.org/integration/autoland/
> pushloghtml?fromchange=596ea55fa962c
> aa18ff1a5761fdccc58ef6a289c&tochange=4f90a5f5fb164f31b77ae71b216cd968570eb97a
> 
> Fischer.json β€” Bug 1309123 - Show persistent-storage permission request
> notification, r=florian
> 
> Fischer, could you check this regression from your bugfix, please.
Found the cause.
Actually this is not about Bug 1309123. This is a regression of an old bug 795764.
Will fix it.
Flags: needinfo?(fliu)
Assignee: nobody → fliu
Comment on attachment 8857570 [details]
Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false,

Hi Jaws,

The same issue as the old bug 795764.
I also update the test for guarding browser.cache.offline.enable=false issue.
For in-content, now the test target should privacy pane, not advanced pane anymore.

Thank you
Attachment #8857570 - Flags: review?(jaws)
No longer blocks: 1309123
Comment on attachment 8857570 [details]
Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false,

https://reviewboard.mozilla.org/r/129542/#review132112

::: browser/components/preferences/SiteDataManager.jsm:113
(Diff revision 1)
>      }
>    },
>  
>    _updateAppCache() {
> -    let groups = this._appCache.getGroups();
> +    try {
> +      let groups =  this._appCache.getGroups();

Did you test this? Isn't `groups` bound to the scope of the try-block?
Attachment #8857570 - Flags: review?(jaws) → review-
Tracking 55+ for this regression.
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #9)
> Comment on attachment 8857570 [details]
> Bug 1355795 - about:preferences#privacy is broken with
> browser.cache.offline.enable=false
> 
> https://reviewboard.mozilla.org/r/129542/#review132112
> 
> ::: browser/components/preferences/SiteDataManager.jsm:113
> (Diff revision 1)
> >      }
> >    },
> >  
> >    _updateAppCache() {
> > -    let groups = this._appCache.getGroups();
> > +    try {
> > +      let groups =  this._appCache.getGroups();
> 
> Did you test this? Isn't `groups` bound to the scope of the try-block?
Yes, I tested. But sorry for that I didn't notice that I was testing without any site so nothing would run there, the below for-loop on sites.
Thank you for pointing out this mistake.
Comment on attachment 8857570 [details]
Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false,

Hi Jaws,

Fix the bound mistake and add one fake site in the test so the sites-looping code would run.

TRY: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d1f0cc23279b369ba2dd6ee82238cee42942cfe
Attachment #8857570 - Flags: review?(jaws)
Comment on attachment 8857570 [details]
Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false,

https://reviewboard.mozilla.org/r/129542/#review132844

::: commit-message-f40e2:1
(Diff revision 2)
> +Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false

Please use the commit message to explain *why* something needs to be changed, not just that something is broken.
Attachment #8857570 - Flags: review?(jaws) → review+
I have noticed the same today and after running mozregression on my own profile, I came to the same bisection result as above. Unfortunately changing browser.cache.offline.enable back to true and restart did not help. Here is what I have found in the browser console.

> Error initializing preference category panePrivacy: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIApplicationCacheService.getGroups]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource:///modules/SiteDataManager.jsm :: _updateAppCache :: line 112"  data: no]  preferences.js:168
> 	gotoPref chrome://browser/content/preferences/in-content/preferences.js:168:5
> 	init_all/< chrome://browser/content/preferences/in-content/preferences.js:67:50
> 	_fireOnSelect chrome://global/content/bindings/richlistbox.xml:78:13
> 	selectItem chrome://global/content/bindings/listbox.xml:247:11
> 	onxblmousedown chrome://global/content/bindings/listbox.xml:979:13
> NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIApplicationCacheService.getGroups]  SiteDataManager.jsm:112
> 	_updateAppCache resource:///modules/SiteDataManager.jsm:112:18
> 	updateSites resource:///modules/SiteDataManager.jsm:72:5
> 	init chrome://browser/content/preferences/in-content/privacy.js:277:7
> 	init chrome://browser/content/preferences/in-content/preferences.js:45:7
> 	init_category_if_required chrome://browser/content/preferences/in-content/preferences.js:38:3
> 	gotoPref chrome://browser/content/preferences/in-content/preferences.js:166:5
> 	init_all/< chrome://browser/content/preferences/in-content/preferences.js:67:50
> 	_fireOnSelect chrome://global/content/bindings/richlistbox.xml:78:13
> 	selectItem chrome://global/content/bindings/listbox.xml:247:11
> 	onxblmousedown chrome://global/content/bindings/listbox.xml:979:13
(In reply to Michal Stanke (Mozilla.cz) [:MikkCZ] (off until 05/2017, use needinfo) from comment #15)
> I have noticed the same today and after running mozregression on my own
> profile, I came to the same bisection result as above. Unfortunately
> changing browser.cache.offline.enable back to true and restart did not help.
> Here is what I have found in the browser console.
> 
> > Error initializing preference category panePrivacy: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIApplicationCacheService.getGroups]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource:///modules/SiteDataManager.jsm :: _updateAppCache :: line 112"  data: no]  preferences.js:168
From the error log, the error occurred is the same as that of browser.cache.offline.enable=false. Both happened when `nsApplicationCacheService::GetGroups` was trying to call `nsApplicationCacheService::GetGroups` and then failed at the NS_ERROR_NOT_AVAILABLE error [1].

[1] https://dxr.mozilla.org/mozilla-central/rev/f40e24f40b4c4556944c762d4764eace261297f5/netwerk/cache/nsCacheService.cpp#1738
Keywords: checkin-needed
Autoland can't push this until all pending issues in MozReview are resolved.
Keywords: checkin-needed
Keywords: checkin-needed
Pushed by philringnalda@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/245952e7a2d5
about:preferences#privacy is broken with browser.cache.offline.enable=false, r=jaws
Keywords: checkin-needed
Backed out in https://hg.mozilla.org/integration/autoland/rev/6f70e74be934 for failures in browser_bug795764_cachedisabled.js like https://treeherder.mozilla.org/logviewer.html#?job_id=91999819&repo=autoland
Comment on attachment 8857570 [details]
Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false,

Hi Jaws,

Because of the introduction of browser.preferences.offlineGroup.enabled pref, we need to consider the case when the OfflineGroup should be disabled (always hidden).

TRY: https://treeherder.mozilla.org/#/jobs?repo=try&revision=cecd5255ef264c9219a7a5b54f46a580f370adb2

Thanks
Attachment #8857570 - Flags: review+ → review?(jaws)
Comment on attachment 8857570 [details]
Bug 1355795 - about:preferences#privacy is broken with browser.cache.offline.enable=false,

https://reviewboard.mozilla.org/r/129542/#review133404
Attachment #8857570 - Flags: review?(jaws) → review+
Keywords: checkin-needed
Pushed by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/703e7d2f3664
about:preferences#privacy is broken with browser.cache.offline.enable=false, r=jaws
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/703e7d2f3664
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Works for me in Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 ID:20170418100213 CSet: bb38d935d699e0529f9e0bb35578d381026415c4 again. Thank you.
Status: RESOLVED → VERIFIED
Are you sure that you don't have broken something? https://web.whatsapp.com and https://web.telegram.org do not appear in the (now gone) list of offline-storing Websites ("Website data"). It says it has 0 bytes and two buttons (Clear all data, Settings). No, I do not delete anything with closing Firefox.

New/Another bug (should I file one) or related to this?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: