[E-2.2.1] [Fennec] Automatic Add-on Installation

RESOLVED FIXED in BW-Future

Status

P1
normal
RESOLVED FIXED
9 years ago
3 years ago

People

(Reporter: fligtar, Assigned: kinger)

Tracking

unspecified
BW-Future
Dependency tree / graph

Details

(URL)

(Reporter)

Description

9 years ago
The user-specified auto-sync collection should be checked for new add-ons on every browser startup and should automatically install any new add-ons it finds. If possible, this should be done without the xpinstall dialog.

And if Fennec has a notifications system, we should inform the user that the add-on has been installed.
(Assignee)

Comment 1

9 years ago
This could get interesting at first run:

http://blog.fligtar.com/2008/10/16/responsible-first-run-usage/
Assignee: nobody → brian
(Reporter)

Updated

9 years ago
Target Milestone: BW-1.0.4 → BW-1.0.5
(Assignee)

Comment 2

9 years ago
For the notifications system, see:

https://bugzilla.mozilla.org/show_bug.cgi?id=489569

This is for installation, but there may be something similar for after. See also:

https://bugzilla.mozilla.org/show_bug.cgi?id=489423
Assignee: brian → dave
Priority: -- → P1
Summary: [E-2.2.1] Automatic Add-on Installation → [E-2.2.1] [Fennec] Automatic Add-on Installation
r51301 has some proof of concept work on this. I will finish off in the morning.
Status: NEW → ASSIGNED
r51348 has a decent stab at this.

On fennec start-up, add-ons from the selected collection are installed via InstallTrigger (this prompts the user to install and displays an "installed" or "failed" notification).

At the moment it is flakey. For some reason some installs fail (even though we check for compatibility) and sometimes the InstallTrigger call just doesn't return, meaning that the install queue breaks.
(Assignee)

Comment 5

9 years ago
Dave,

What Fennec version are you running? I just grabbed a builds (for Win and Mac) from:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mobile-trunk/

.. but I can't even install the Collector because local file browsing is broken in those builds.
(In reply to comment #5)
> What Fennec version are you running? 

fennec-1.0b4pre.en-US.linux-i686

> .. but I can't even install the Collector because local file browsing is broken
> in those builds.

I put the XPI on a local webserver and installed like that.
Ccing Mark.

Any ideas on the most reliable way to trigger an XPI install inside Fennec? I'm currently using InstallTrigger.install, but it seems quite flakey.
(Assignee)

Comment 8

9 years ago
From fligtar:

I just tried on the Collector on Fennec 1.0b4pre (emulator). Looks like we still need to get the password field and select box sorted out. I tried entering a collection name and restarting and nothing installed, but it's probably something to do with me not entering the name correctly. Are we waiting on mfinkle for those?

I noticed that they changed the add-on installation dialog for Fennec. When we automatically install add-ons, we should probably overlay to say something like "Automatically installing add-ons from your mobile collection" and cycle through the names of each as we install them and then have a restart button.
(In reply to comment #8)

> I just tried on the Collector on Fennec 1.0b4pre (emulator). Looks like we
> still need to get the password field and select box sorted out. I tried
> entering a collection name and restarting and nothing installed, but it's
> probably something to do with me not entering the name correctly. Are we
> waiting on mfinkle for those?

Support for passwords and menulists in preferences has landed. See:
https://wiki.mozilla.org/Mobile/Fennec/Extensions/Options
(In reply to comment #9)
> Support for passwords and menulists in preferences has landed. See:
> https://wiki.mozilla.org/Mobile/Fennec/Extensions/Options

Thanks Mark, that's going to be helpful.

Any thought on my comment #7?
David - InstallTrigger.install seems like a common way to do it. Can you file a Fennec bug about the flakiness? We should make it work well.

What is the use case? You could always download the XPI and use the nsIExtensionManager to install the local XPI.
(In reply to comment #11)
> David - InstallTrigger.install seems like a common way to do it. Can you file a
> Fennec bug about the flakiness? We should make it work well.

I changed the way I'm calling it (not quite on cold startup) and it's working as expected now.

(In reply to comment #9)
> Support for passwords and menulists in preferences has landed. See:
> https://wiki.mozilla.org/Mobile/Fennec/Extensions/Options

I can't seem to get the menulists to do it for me. I've filed some details in bug 516122.
I've refactored the auto-install behaviour for fennec.

1) On startup, if we have an autoinstall collection with add-ons that haven't been installed yet, then we open fennec's extension manager.

2) Bandwagon adds the collections to be installed to the list of add-ons under the title "Add-ons from your mobile collection".

3) Bandwagon notifies the user that "Add-on Collector is automatically installing add-ons from your mobile collection" and steps through the list installing each add-on. Feedback is using the same progress bar as any normal install via this dialog.

4) When finished, the user is prompted to restart.

5) We only autoinstall those add-ons that match the os/browser/version that are not already installed. Any add-on that fails to install is added to a black-list, so won't be attempted again.

r52323

(If you want to test this solution, be aware the menulist setting is not working yet. Instead set the mobile_sync_collection pref manually.)
(Assignee)

Comment 14

9 years ago
(In reply to comment #12)
> I can't seem to get the menulists to do it for me. I've filed some details in
> bug 516122.

https://bugzilla.mozilla.org/show_bug.cgi?id=516122#c12

David, seeing the last screenshot where the radio buttons of the console
manager are not styled correctly, I think that your issue comes from an add-on
that includes a stylesheet it shouldn't. Can you check by disabling them all
but yours ?
Depends on: 520368
Depends on: 520369
No longer depends on: 520369
Depends on: 520369
(Assignee)

Comment 15

9 years ago
Dave, FYI because of bug 520368, I've made the following change:

--- install.rdf	(revision 53136)
+++ install.rdf	(working copy)
@@ -44,8 +44,8 @@
     <em:targetApplication>
       <Description>
         <em:id>{a23983c0-fd0e-11dc-95ff-0800200c9a66}</em:id>
-        <em:minVersion>1.0b4pre</em:minVersion>
-        <em:maxVersion>1.0b4pre</em:maxVersion>
+        <em:minVersion>1.0b5pre</em:minVersion>
+        <em:maxVersion>1.0b5</em:maxVersion>
       </Description>
     </em:targetApplication>
Bug 520368 has been fixed and is working for me with the latest nightly.

r53205 of bandwagon includes support for the above.

Also in this revision is support for populating the options menulist with the list of collections.

I don't see any direct way to allow menulist population when the addon's settings panel is loaded (maybe we should request that), but I'm achieving the same effect using event listeners.
(Assignee)

Updated

9 years ago
Depends on: 530566
(Assignee)

Updated

9 years ago
Depends on: 530568
(Assignee)

Updated

9 years ago
Depends on: 530570
(Assignee)

Updated

9 years ago
Depends on: 530571
(Assignee)

Updated

9 years ago
Depends on: 530572
(Assignee)

Updated

9 years ago
Depends on: 530574
Working for me, so closing.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Comment 18

9 years ago
(In reply to comment #17)
> Working for me, so closing.

As the original, I want to keep this open as a meta bug that other Fennec issues that can block against it.
Assignee: dave → brian
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

9 years ago
Depends on: 532939
(Assignee)

Updated

9 years ago
Status: REOPENED → ASSIGNED
(Assignee)

Updated

9 years ago
Depends on: 532941
(Assignee)

Updated

9 years ago
Depends on: 532950
(Assignee)

Comment 19

9 years ago
Moving meta bug out of release target.
Target Milestone: BW-1.0.5 → BW-Future
(Reporter)

Updated

9 years ago
Component: Collections → Collector Extension
QA Contact: collections → collector-extension
(Assignee)

Updated

8 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago8 years ago
No longer depends on: 520369
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.