Closed Bug 1234658 Opened 9 years ago Closed 9 years ago

foreignInstall flag is true for add-ons installed from AMO

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: TheOne, Unassigned)

References

Details

Attachments

(4 files)

We haven't found a reliable way to reproduce this yet, but sometimes somehow foreignInstall is being set to true for add-ons installed from AMO which causes preliminary reviewed add-ons to get disabled. STR are still pending.
I saw this happening with "Tree Style Tabs" after upgrading to 43 in a profile that was about 1.5 years old. I was also able to reproduce this exactly once with a fresh profile in 42 and then upgrading to 43.
See Also: → 1233459, 1234321
Just a note that 12,646 add-ons are preliminary reviewed on AMO and could get into this state potentially.
Note that this isn't specific to AMO — we saw this with two different unlisted, front-loaded extensions of Zotero's, one of which has never been on AMO and another that hasn't been on AMO for years and was likely never installed from there by the affected users. Looking at the extensions.json files of people who reported this, various extensions had the flag set to true seemingly in error, but I couldn't find any pattern as to which ones.
Assignee: nobody → kmaglione+bmo
Status: NEW → ASSIGNED
Assignee: kmaglione+bmo → nobody
Status: ASSIGNED → NEW
I have installed some preliminary reviewed addons in AMO-dev using FF42(Win7), this is the screencast after installing them: http://screencast.com/t/aQkjQqmduwii I updated the browser to 43 and then restarted. The result was that all the add-ons installed were removed: http://screencast.com/t/XdZCqcki
Attaching the logs obtained after following TheOne steps. Here are the logs after the addons were installed.
Attached file logsAfterRestart.txt
The logs quiting firefox and update.
Attached file extensions.json
:TheOne Please let me know if I can do anything else.
(In reply to Madalin Cotetiu from comment #5) > I have installed some preliminary reviewed addons in AMO-dev using > FF42(Win7), this is the screencast after installing them: > http://screencast.com/t/aQkjQqmduwii > I updated the browser to 43 and then restarted. > The result was that all the add-ons installed were removed: > http://screencast.com/t/XdZCqcki In the first screenshot, the add-ons are "pending for install" ("<add-on-name> will be installed after you restart Firefox"), they are not yet fully installed. Is the behaviour different if at that point you restart the same browser version (e.g. by clicking "Restart now" on any of these add-ons) and only upgrade the browser afterwards? (with a second restart, or a closedown and startup)
(In reply to Madalin Cotetiu from comment #6) > Created attachment 8701824 [details] > logsAfterAddonInstall.txt > > Attaching the logs obtained after following TheOne steps. > Here are the logs after the addons were installed. Those were the steps I provided: 1) Install 42 and use a fresh profile 2) set "extensions.logging.enabled" to true 3) restart Firefox with -console 4) install the add-ons 5) Copy the output in the console to a safe place 6) Look for updates, let 43 install 7) Quit Firefox normally (no restart) 8) Copy extensions.json to a safe place 9) Start Firefox with -console again 10) Copy the console output to a safe place 11) Quit Firefox 12) Copy the extension.json to a safe place
Assignee: nobody → dtownsend
(In reply to Madalin Cotetiu from comment #5) > I have installed some preliminary reviewed addons in AMO-dev using > FF42(Win7), this is the screencast after installing them: > http://screencast.com/t/aQkjQqmduwii > I updated the browser to 43 and then restarted. > The result was that all the add-ons installed were removed: > http://screencast.com/t/XdZCqcki These add-ons are from the dev site and so don't use the production signing root and so Firefox considers them unsigned. Because you don't restart Firefox 42 after staging the add-on installs you hit bug 1196797 and Firefox 43 removes the extensions entirely. Setting xpinstall.signatures.dev-root to true in the profile would make Firefox consider these add-ons to be properly signed.
I can't find any way to reproduce this and without that I can't understand what is going on here.
Assignee: dtownsend → nobody
Kris and I were both inspecting the code that could lead to this. The only possible way we could identify is when the extensions metadata (extensions.json?) gets thrown away, possibly due to a file locking issue. We need to investigate how we could simulate that on a Windows machine.
(In reply to Andreas Wagner [:TheOne] from comment #14) > Kris and I were both inspecting the code that could lead to this. The only > possible way we could identify is when the extensions metadata > (extensions.json?) gets thrown away, possibly due to a file locking issue. > We need to investigate how we could simulate that on a Windows machine. Is this windows only? We have had many issues in the past with tools like Anti-virus and backup locking files that then breaks things.
(In reply to Dave Townsend [:mossop] from comment #15) > (In reply to Andreas Wagner [:TheOne] from comment #14) > > Kris and I were both inspecting the code that could lead to this. The only > > possible way we could identify is when the extensions metadata > > (extensions.json?) gets thrown away, possibly due to a file locking issue. > > We need to investigate how we could simulate that on a Windows machine. > > Is this windows only? We have had many issues in the past with tools like > Anti-virus and backup locking files that then breaks things. I don't know. I have seen it several times on a Windows machine. I don't know of any occurrences on other platforms, but that doesn't mean anything. I don't think we gathered that data from people reporting this issue.
We had a report from an Ubuntu user, who had an extensions.json file with a whole bunch of extensions, including many with the AMO CDN as the sourceURI, marked as foreignInstall: true|1.
(In reply to Dan Stillman from comment #17) > We had a report from an Ubuntu user, who had an extensions.json file with a > whole bunch of extensions, including many with the AMO CDN as the sourceURI, > marked as foreignInstall: true|1. Do you have any more details on this? It's not uncommon for add-ons to be installed in strange ways via system package managers on Linux, or for package managers/users to do strange things with profiles, so I wouldn't be surprised if this was unrelated. There are definitely cases of this happening to Windows users with more ordinary usage patterns, though, and I haven't heard of anyone reproducing it on OS-X.
(In reply to Andreas Wagner [:TheOne] from comment #14) > Kris and I were both inspecting the code that could lead to this. The only > possible way we could identify is when the extensions metadata > (extensions.json?) gets thrown away, possibly due to a file locking issue. > We need to investigate how we could simulate that on a Windows machine. I don't think that was my conclusion. If extensions.json gets thrown away, we should recreate the database in recovery mode, and detected extensions should not have the foreign install flag. If we had a valid database at startup, though, and it didn't include the add-on, that would cause it to be marked as a foreign install. You said this happened to you after installing the add-on, and then immediately restarting a couple of times, which led me to suspect that there may have been an issue writing the updated database after the first restart, and the add-on being detected as a foreign install after the second. This is basically a stab in the dark until we have a reliable way of reproducing this, though.
(In reply to Kris Maglione [:kmag] from comment #19) > (In reply to Andreas Wagner [:TheOne] from comment #14) > > Kris and I were both inspecting the code that could lead to this. The only > > possible way we could identify is when the extensions metadata > > (extensions.json?) gets thrown away, possibly due to a file locking issue. > > We need to investigate how we could simulate that on a Windows machine. > > I don't think that was my conclusion. If extensions.json gets thrown away, > we should recreate the database in recovery mode, and detected extensions > should not have the foreign install flag. If we had a valid database at > startup, though, and it didn't include the add-on, that would cause it to be > marked as a foreign install. Yeah I just verified this with a local profile. Deleting extensions.json (same effect as if it is corrupt or otherwise unreadable) means it gets recreated and foreignInstall set to false for already installed add-ons. It probably isn't perfect but we're erring on the right side there I think. > You said this happened to you after installing the add-on, and then > immediately restarting a couple of times, which led me to suspect that there > may have been an issue writing the updated database after the first restart, > and the add-on being detected as a foreign install after the second. This is > basically a stab in the dark until we have a reliable way of reproducing > this, though. Yeah it would have to be either blocking extensions.json writes during a restartless install (and until app exit) or blocking on the next startup while installing a restartful add-on but then not blocking later. Do we have any idea about if this only affects restartless or restartful?
(In reply to Dave Townsend [:mossop] from comment #20) > Do we have any idea about if this only affects restartless or restartful? Every report I've seen so far has been for a restartful add-on.
(In reply to Tony Mechelynck [:tonymec] from comment #10) > (In reply to Madalin Cotetiu from comment #5) > > I have installed some preliminary reviewed addons in AMO-dev using > > FF42(Win7), this is the screencast after installing them: > > http://screencast.com/t/aQkjQqmduwii > > I updated the browser to 43 and then restarted. > > The result was that all the add-ons installed were removed: > > http://screencast.com/t/XdZCqcki > > In the first screenshot, the add-ons are "pending for install" > ("<add-on-name> will be installed after you restart Firefox"), they are not > yet fully installed. Is the behaviour different if at that point you restart > the same browser version (e.g. by clicking "Restart now" on any of these > add-ons) and only upgrade the browser afterwards? (with a second restart, or > a closedown and startup) Sorry, I missed this comment. The results where the same even when using your scenario. All the installed add-ons were removed.
(In reply to Madalin Cotetiu from comment #23) > (In reply to Tony Mechelynck [:tonymec] from comment #10) > > (In reply to Madalin Cotetiu from comment #5) > > > I have installed some preliminary reviewed addons in AMO-dev using > > > FF42(Win7), this is the screencast after installing them: > > > http://screencast.com/t/aQkjQqmduwii > > > I updated the browser to 43 and then restarted. > > > The result was that all the add-ons installed were removed: > > > http://screencast.com/t/XdZCqcki > > > > In the first screenshot, the add-ons are "pending for install" > > ("<add-on-name> will be installed after you restart Firefox"), they are not > > yet fully installed. Is the behaviour different if at that point you restart > > the same browser version (e.g. by clicking "Restart now" on any of these > > add-ons) and only upgrade the browser afterwards? (with a second restart, or > > a closedown and startup) > > Sorry, I missed this comment. > The results where the same even when using your scenario. All the installed > add-ons were removed. The add-ons get completely removed from the add-ons manager? That would be very unexpected but if so please file a new bug to track it, it isn't the issue we're trying to find here.
I can't no longer reproduce the issue I have mentioned in comment 5. Restarting the browser after or before updating have the same result, the add-ons are still displayed as enabled: http://screencast.com/t/JmUSaXUz
Blocks: 1240191
If bug 1245956 happens, then this will be irrelevant.
Taken off the signing blocker. Mossop, is this something you think we should keep open to get accurate foreignInstall data? Without reliable STR, not sure if there's much we can do here.
No longer blocks: 1240191
Yeah ultimately with no way to reproduce this I don't think we're ever going to see this fixed.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: