Closed Bug 700233 Opened 13 years ago Closed 6 years ago

Firefox Extension not installed when importing IE stuff/settings during installation process

Categories

(Toolkit :: Add-ons Manager, defect)

7 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: mcsergiu, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Build ID: 20110928134238 Steps to reproduce: Installed Firefox 7.0.1 and imported settings from IE. Actual results: Noticed that my Firefox extension is not loaded anymore. Useful information: 1. OS is Windows 2. Extension is locally installed part of a software product therefore we use the Windows registry keys, more exactly the HKLM\SOFTWARE\Mozilla\Firefox\Extensions. 3. Extension uses an unpacked XPI folder and it is a binary component (DLL) 4. Firefox 7.0.1 is installed AFTER the software product so Firefox will find the registry key with the extension value already set 5. No Firefox profiles exist (remove everything from %APPDATA%\Roaming\Mozilla to reproduce (%APPDATA%\Local\Mozilla too if necessary) 6. Start Firefox - no profile will trigger the "Import" wizard page, select Import, allow Firefox to show the main windows and then look at the Error Console which will print: "WARN addons.xpi: Add-on is invalid: TypeError: targetAppInfo is undefined" at XPIProvider.jsm, line 699. As long as you have profiles (ignore step 5.) the same extension will load without errors. As long as you don't select Import the same extension will load without errors. XPIProvider.jsm code before line 699 shows "let targetAppInfo = {}; " How could targetAppInfo be undefined? This is clearly a JS error caused by whatever Firefox does to import bookmarks, cookies, etc. If I modify some file in the extension folder (to trigger Firefox's update mechanism for extensions) and I restart Firefox the same extension will load without errors. Other findings which might help you: We have identified a workaround that works for us but it does not relate to the JS error at all. We modify the last modified date time of the extension folder and ask the user to restart Firefox if it is already opened when our product wants to use the extension and cannot find it. This triggers Firefox to reload the extension and since it is a new process and profiles exist, it will not import from IE the JS error will not occur and the add-on will load as expected. There is a caveat though. Since we are talking of an unpacked extension and a pre-installed product, the folder will most likely be in Program Files, where not everyone can write on Vista and Windows 7. In our case we have a service that provides a "big hammer" when needed (access rights). We have also identified another possible workaround, used by the .NET Framework Assistant extension from Microsoft. They actually pack their add-on into another add-on. The "proxy" add-on installs an XPI in the current user %APPDATA% using the nsIExtensionManager - a simple chrome.jar that contains the JS with a global function that calls upon the extension manager to install from file. This would work with the Add-on Manager as well. This removes the need for access rights into locked locations like Program Files and Windows in user mode since the actual add-on that has the payload is installed in the user data folder, where it can be upgraded and so on. Expected results: The Firefox extension should be loaded no matter if I chose or not to import the IE settings at the end of FF installation process.
Component: Extension Compatibility → Add-ons Manager
Product: Firefox → Toolkit
QA Contact: extension.compatibility → add-ons.manager
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.