Closed Bug 250847 Opened 20 years ago Closed 20 years ago

problems with -install-global-extension on linux/solaris

Categories

(Toolkit :: Add-ons Manager, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: djh, Assigned: bugs)

References

Details

(Keywords: fixed-aviary1.0)

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040706 Firefox/0.9.1 Build Identifier: -install-global-extension doesn't seem to work on Linux. No output is given, and the extension is not installed. It works on WinXP. I've tested Firefox 0.9.1 and Thunderbird 0.7.1 on Linux, and Thunderbird 0.7.2 on WinXP. I used the ImageZoom and Enigmail extensions for testing. Reproducible: Always Steps to Reproduce: 1. untar firefox into /tmp 2. launch firefox, and exit (ensures that the extensions directory gets created) 3. run /tmp/firefox/firefox -install-global-extension /tmp/extension.xpi
I can confirm for Solaris 8/Sparc that -install-global-extension shows odd behaviour, too: firefox -install-global-extension /tmp/extension.xpi will not do anything, but firefox -install-global-extension /tmp/extension.xpi ANYTHING will work (with ANYTHING being any odd string). All commands were executed as root.
> firefox -install-global-extension /tmp/extension.xpi ANYTHING > will work (with ANYTHING being any odd string). Nice catch. There is another problem with install-global-extension/lock-item/etc. - they require X to function. It should be possible to use these commands in (rpm/dpkg) installation scripts without requiring X. (ie. how -register is handled)
Summary: -install-global-extension doesn't work on Linux → problems with -install-global-extension on linux/solaris
There was no problem with the Mac version(0.9.1). But, it reproduced with the Windows version(0.9.2). Mac OS X 10.3.4 Windows XP Pro SP1
I have spent *hours* wrestling with this problem, both in 3rd party packaged versions and with official mozilla installer, for both Firefox and Thunderbird, even going so far as to reproduce it with a virgin linux FC2 install. It should be absolutely trivial to confirm. Further, poking around in bugzilla, this smells an awful lot to me like older bugs 14923 and 16599, dating to 1999 and 2000 respectively. The only thing that has changed over the last 5 years is that the mozilla environment has evolved to the point where there are no longer and viable wor-arounds. This is extensively documented as bugzilla.fedora.us bug 1765, among several downstream linux packaging bugzillas. The net impact of this bug is that, in order to benefit from extensions: 1) mozilla apps have to be installed individually for each user in a multi-user *nix environment, wasting vast amounts of space and 2) certain extensions, e.g enigmime + enigmail (which require elevated privileges to install and for crypto function properly) simply cannot be installed at all. In other words, Firefox/Thunderbird extensions are *BADLY* *BROKEN* and Firefox/Thunderbird have a _HUGE_ _FOOTPRINT_ under unix/linux. Can we please confirm this, assign it a priority and have someone who understands the code base take action on this?!?!
The problem is that all arguments that being with a '/' are made into a file:// URL by the nsCmdLineService::ProcessURLArg() method. However, nsILocalFile::InitWithPath() foesn't understand file:// URLs. It expects a native fully-qualified path. The attached patch to nsExtensionManager.js.in corrects the problem by stripping off any leading "file://" from the aPath argument passed by install-global-{extension,theme}. I'm not sure this is the fix you'll want to go with, but this is what I added to the FreeBSD port, and works with Tunderbird and Firefox.
Comment on attachment 154501 [details] [diff] [review] Fix the path to the XPI file before passing it to nsILocalFile this is not the way to do it. use @mozilla.org/network/io-service
Something along the lines of this patch then?
Attachment #154501 - Attachment is obsolete: true
I'm told by the current Fedora maintainer of Firefox that this prevents proper packaging. Can we get this considered for 1.0?
Flags: blocking-aviary1.0PR?
Flags: blocking-aviary1.0?
yes, let's try to address in before 1.0 ships. bryner/vlad, can you help?
Flags: blocking-aviary1.0PR? → blocking-aviary1.0PR-
*** Bug 257778 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.0? → blocking-aviary1.0+
I confirm the Thomas' comment (#1) for Linux Fedora Core 2, FF 1.0PR: firefox -install-global-extension /tmp/extension.xpi ANYTHING will work (with ANYTHING being any odd string). Without this ANYTHING, however, i.e.: firefox -install-global-extension /tmp/extension.xpi it behaves very nasty: it starts to recursively create /firefox_path/extension/temp directories containing a copy of the whole firefox install directory, then another copy in extension/temp of that temporary directory and so on. The process stopped by itself (probably by making some path too long to process) on my machine after about 5 minutes of making really HEAVY load. It then took about a minute to rm -rf firefox/extensions/temp :( Strange bug!
I don't really like the fix here because we only end up with a url at all by accident. The real problem is that nsCommandLineService believes the last argument is a file to open in the browser instead of an argument to the command-line switch. This is because it has no knowledge of the actual command line handlers and whether they are expecting an argument or not. However, that's risky to fix at this stage, and the capability to handle URLs may be useful. But, I think the patch as-is will break the case where the argument is _not_ a url, such as when it's a relative path or a windows path. So it needs to test whether the argument parses as a URI: try { var uri = ioServ.newURI(aPath, null, null); aPath = uri.path; } catch (e) {}
Comment on attachment 155328 [details] [diff] [review] Another fix for the file:// problem minusing per previous comments
Attachment #155328 - Flags: review-
Attached patch patchSplinter Review
#ifdef XP_UNIX since there doesn't appear to be a problem with windows and I don't want to tempt fate...
Attachment #155328 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Keywords: fixed-aviary1.0
From what I can tell, to install an extension, you're supposed to do the following as root: firefox -install-global-extension <extension filename> When I try this, I get an error message: [root@desktop2 firefox-1.0]# firefox -install-global-extension /tmp/hbar-0_1.xpi *** loading the extensions datasource *** nsExtensionManager::_finishOperations - failure, catching exception so finalize window can close [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIZipReader.open]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///usr/lib/firefox-1.0/components/nsExtensionManager.js :: nsExtensionInstaller__installExtensionFiles :: line 979" data: no] I tried this with two different extensions that both install fine for a single user (homeland security status and image zoom), so I don't think it's a problem with the extensions. This is a Mandrake 9.2 machine. Help! Will be happy to provide more info or help with troubleshooting.
I'm still having exactly this problem with firefox 1.0.2. I look through the bug reports and this same thing keeps getting reported over and over again, but the bugs get closed with what seem to be excuses, never a real fix. There is currently a bug report, 266615, that was changed to say no error from incompatable extension, but it is still the same problem. I've been trying since Firefox .9 to get a global extension to install, MozEx, that I only need because Firefox doesn't handle Telnet, with no luck. I support 100 PCs with Linux, with about 70 users in a test environment, so that they constantly move betweens the PCs. I cannot deploy Forefox since telnet links don't work and I can't figure out any way to get it to work. Oh, MozEx installs just fine if I simply load the file from the open file menu, but of course that only does it for the individual. I don't care if I have to manually copy and change files, just give me a way to get this installed, or at least a way to get telnet links to work.
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: