Closed Bug 466298 Opened 16 years ago Closed 13 years ago

Problems installing an extension if it already exists in the profile as a file link pointing to a non-existent directory

Categories

(Toolkit :: Add-ons Manager, defect)

1.9.0 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla6

People

(Reporter: Gijs, Assigned: mossop)

References

Details

Attachments

(4 files)

Attached file Console output
Note: I've tried to follow the steps at http://www.oxymoronical.com/blog/2008/06/Filing-good-Extension-Manager-bugs . Do let me know if you need any more info.

0. Remove extensions.ini, extensions.cache, extensions.rdf and extensions.log ;
Set extensions.logging.enabled to true ;
Set javascript.options.showInConsole to true ;
Set javascript.options.strict to true ;

1. Start Firefox
1b. Pick "default" profile

The output in the console log is attached.

2. Clear Error Console

3. File > Open File > navigate to xpi file (attached)

Actual result:
Error message in Mac alert window appears at screen position (0,0) (not attached to the window...)
Not everything is visible/readable, but what I can copy reads:

file:///Users/gijskruitbosch/devmoz/chromelist/chromelist.xpi

because: Unexpected installation error
Review the Error Console log for more details.

Upon clicking OK, the add-ons window appears, with the Installation tab selected - but this is blank.
If I now try to install again, I get another alert window, this time attached to the Add-ons window. It reads:

Error
Firefox could not install the file at
file:///Users/gijskruitbosch/devmoz/chromelist/chromelist.xpi

because: Unexpected installation error
Review the Error Console log for more details.
-203



At this point, the Error Console is still blank, and the console log has no additional information.

I will attach the re-generated extensions.* files (though I'm not sure if they're relevant, given that I deleted them before installing).
Attached file Chrome List xpi
I just tested, and it seems to work absolutely fine in my other/blank profile. I'll try to test trunk / 3.1b1 later today.
Only my experience: I got 203 if I had my antivirus guard active (Antivir) and a specific number of add-ons already installed. I have reports that this also happens with AVG and ... uh, forgot the third application (Kaspersky?). So deactivate the scanning of the extensions.* files and try it again, please.
Hi Arch. Thanks for trying to help. Unfortunately this is on Mac. None of these programs you mention are running.
No. Besides, then it would also have failed to install in another profile. Furthermore, to my knowledge all the programs you're naming are windows only anyway, and as I already said this is on a mac...
Dave: could you have a look at this? I recently ran into this again, and it'd be great if it could be fixed. Bit annoying. If you need more/different info, just let me know!
Attached patch log patchSplinter Review
(In reply to comment #8)
> Dave: could you have a look at this? I recently ran into this again, and it'd
> be great if it could be fixed. Bit annoying. If you need more/different info,
> just let me know!

Without a way for me to reproduce it is a bit difficult to understand what might be going on here. What you could do however is grab some more specifics on the actual error. I haven't tested this, but if you apply something like the attached patch then you should definitely get something in the error console after a failed install.
Alright, so this gets me the following:

[Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsILocalFile.persistentDescriptor]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: file:///Applications/Firefox.app/Contents/MacOS/components/nsExtensionManager.js :: getDescriptorFromFile :: line 437"  data: no]

Note that this is on: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6

No idea what it's doing here. Trying to poke further with Venkman fails because nsExtensionManager.js is loaded too early for me to debug it. :-(
Poking about Bugzilla gets me bug 445959, but I am the only user on this machine, and admin, and I'm trying to install into userspace, so I don't think this should be a problem? I did upgrade from Firefox 2, but I didn't expect that to be a problem, either...
You could put logging of file.path into getDescriptorFromFile to see exactly which one it is failing on, maybe even a stack of exactly what is calling it. I won't have much time to look till I am back in the UK though.
D'oh.

So I recently poked this again, and only then realised there was a file linking the extension in (ie, filename "chromelist@extensions.gijsk.com", with only content being a local directory (full) path), that pointed to a non-existing directory. Which is why the add-on didn't show up in the Add-ons dialog, but a new version ("normal" xpi) also didn't install. Not sure if the eventual failure is because that file was there in the first place, or because the directory didn't exist, but that seems to have caused it. Would that help?
Ah yes that would cause problems. We should at he very least log sensible errors in such cases, if not handle it automatically. Thanks for finding that.
Summary: Can't install new version of Chrome List in my profile (error -203) → Problems installing an extension if it already exists in the profile as a file link pointing to a non-existent directory
Target Milestone: --- → mozilla1.9.2
Target Milestone: mozilla1.9.2 → mozilla1.9.3
Now that bug 416905 is fixed this situation cannot occur anymore
Status: NEW → RESOLVED
Closed: 13 years ago
Depends on: 416905
Resolution: --- → FIXED
Already verified bug 416905 and we remove any invalid file pointers now. So Dave is right that it cannot happen anymore. Marking as verified fixed with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0a2) Gecko/20110529 Firefox/6.0a2 ID:20110529042002
Assignee: nobody → dtownsend
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Flags: in-litmus-
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: mozilla2.0 → mozilla6
Happy to see this fixed. Thanks, Dave and Henrik! :-)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: