KidFox: Restricted profiles - Can't install add-ons

VERIFIED FIXED in Firefox 42

Status

()

defect
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: csuciu, Assigned: sebastian)

Tracking

Trunk
Firefox 43
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 verified, firefox43 verified, fennec42+)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Latest Nightly/Aurora
Nexus 7 (5.1.1)

Steps:
1. As 'owner', enable add-ons installation
2. On the restricted profile, open Nightly/Aurora, and go to Menu -> Tools -> Add-ons
3. Select an add-on and tap on 'Add to Firefox'

Expected: Add-ons can be installed

Actual: 
- On Nightly nothing visual happens
- On Aurora, the incompatibility error message (Add-on could not be installed because is not compatible with Aurora 42.0a2) is triggered

From logs (same error for both, Nightly and Aurora):
E/GeckoConsole(13944): [JavaScript Error: "ReferenceError: _gaq is not defined" {file: "https://addons.cdn.mozilla.net/static/js/zamboni/mobile-min.js?build=1ae360d-55d5fe5f" line: 4}]
Blocks: FFB, kidfox-v1
I can reproduce the issue on latest Nightly, on a regular profile, in guest mode session: nothing happens when tapping "Add to Firefox" for installing an add-on.
For the record: "Does nothing" for the "Add to Firefox" button is currently the correct behavior. We are thinking about showing something more helpful in bug 1192784.

Back to the bug: I can't really reproduce this on my N9. However if I start the browser on a restricted profile. Switch to the admin profile. Allow add-on installation. Then switch back to the restricted profile and resume(!) the browser. Then I can't install add-ons until I (re-)start the browser.

Can you confirm that stopping and starting the browser resolves the issue? (I assume you are nevertheless having a more permanent problem because you are seeing the menu items for add-ons but still can't install one.)
Flags: needinfo?(teodora.vermesan)
Flags: needinfo?(catalin.suciu)
(Reporter)

Comment 3

4 years ago
Restarting Firefox does not help.

Here are some more precise steps that I used to reproduce this issue on N7 (5.1.1) and Xperia Z2 (5.0.2):

1. Crate a new restricted profile
2. Go to the restricted profile's settings

if
3a. Enable Nightly and leave 'Add-ons installation' disabled
4a. Switch to the restricted profile and check that the 'Add-ons' menu item is hidden
5a. Switch back to 'owner' and enable 'Add-ons installation'
6a. Switch to the restricted profile and restart Nightly
7a. Try to install an add-on
Result: Nothing happens when trying to install an add-on

if
3b. Enable Nightly and enable 'Add-ons installation'
4b. Switch to the restricted profile and start Nightly > Add-ons CAN be installed 
5b. Switch back to 'owner' and disable 'Add-ons installation'
6b. Switch to the restricted profile and restart Nightly > 'Add-ons' menu item is hidden
7b. Switch back to 'owner' and enable 'Add-ons installation' 
8b. Switch to the restricted profile and restart Nightly
9b. Try to install an add-on
Result: Nothing happens when trying to install an add-on
Flags: needinfo?(teodora.vermesan)
Flags: needinfo?(catalin.suciu)
Jonathan: I saw discussions on IRC in my logs that you were facing a similar problem (unrelated to restricted profiles). Did you find what was causing it? Maybe this is related.
Flags: needinfo?(jalmeida)
Yes, this looks similar to the problem I was seeing. I created bug 1201534 to track this. Installing addons from addons.mozilla.org should work, but direct links seem to fail.
Depends on: 1201534
Flags: needinfo?(jalmeida)
The problem seems to be in browser.js:
https://dxr.mozilla.org/mozilla-central/rev/9ed17db42e3e46f1c712e4dffd62d54e915e0fac/mobile/android/chrome/content/browser.js#517-522

>    if (!ParentalControls.isAllowed(ParentalControls.INSTALL_EXTENSION)) {
>      // Disable extension installs
>      Services.prefs.setIntPref("extensions.enabledScopes", 1);
>      Services.prefs.setIntPref("extensions.autoDisableScopes", 1);
>      Services.prefs.setBoolPref("xpinstall.enabled", false);
>    }

If the restricted profile is entered with extension installation disabled once then this is persisted and never reset.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
tracking-fennec: --- → 43+
Bug 1199177 - Restricted profiles: Reset add-on preferences if restriction is not enabled. r?margaret
Attachment #8661736 - Flags: review?(margaret.leibovic)
tracking-fennec: 43+ → 42+
Comment on attachment 8661736 [details]
MozReview Request: Bug 1199177 - Restricted profiles: Reset add-on preferences if restriction is not enabled. r?margaret

https://reviewboard.mozilla.org/r/19439/#review17419

Good catch.
Attachment #8661736 - Flags: review?(margaret.leibovic) → review+
Comment on attachment 8661736 [details]
MozReview Request: Bug 1199177 - Restricted profiles: Reset add-on preferences if restriction is not enabled. r?margaret

Approval Request Comment

[Feature/regressing bug #]: Bug 1125289 - KidFox: Restricted profiles - Hide all add-ons and apps installation/removal features and related UI

[User impact if declined]: If add-on installation has been disabled once then it can never be enabled again for the restricted profile. Feature launches in Fx42.

[Describe test coverage new/current, TreeHerder]: Local testing. No UI test support for restricted profiles yet.

[Risks and why]: Low.

[String/UUID change made/needed]: -
Attachment #8661736 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/e5b69f126a06
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Comment on attachment 8661736 [details]
MozReview Request: Bug 1199177 - Restricted profiles: Reset add-on preferences if restriction is not enabled. r?margaret

Important issue with a new feature, taking it.
Attachment #8661736 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Comment 13

4 years ago
Verified as fixed on latest Nightly.
Status: RESOLVED → VERIFIED

Comment 15

4 years ago
Verified as fixed in Firefox 42 Beta 1;
Device: Nexus 7 (Android 5.1.1).
You need to log in before you can comment on or make changes to this bug.