Closed Bug 301587 Opened 19 years ago Closed 14 years ago

Invalid iconURI in install.rdf is not handled very gracefully

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME
mozilla2.0

People

(Reporter: mkaply, Unassigned)

Details

I had a bad URI for my icon in my install.rdf, so my extension didn't work. The
error in the JS console was:

ExtensionManager:_finishOperations - failure, catching exception...
[Exception... "Component returned failure code: 0x804b000a
[nsIIOService.newURI]"  nsresult: "0x804b000a (<unknown>)"  location: "JS frame
:: file:///C:/deerpark/firefox/components/nsExtensionManager.js :: newURI ::
line 543"  data: no]

Per bsmedberg, opening up this bug to see if we can detect this and put a more
graceful error message out.
What behavior do you think is appropriate? I'd prefer to not make the EM provide debug info for people developing extensions to avoid the EM getting even more ugly. What I'd like to see is an extension developer kit that would provide this type of functionality instead.
I just don't think it should be a failure. Not having a valid icon shouldn't be a reason that the extension fails...
On the other hand the extension developer might not notice it is not shown if they use an invalid uri for iconURL if the behavior were changed... then again we don't verify it actually exists in chrome which will also prevent it from being shown if it doesn't exist. I could go either way in regards to this behavior though I think it is probably more appropriate to not install an extension that has invalid data per the install.rdf spec so it is immediately apparent to the extension author that their data is incorrect.
Then can we do something better on the console? Because the error is newURI, you have no callstack to figure out why it happened...
Sure, I've been planning on fixing / beefing up the error msgs for install failures.
Product: Firefox → Toolkit
Target Milestone: --- → mozilla1.9.2
Target Milestone: mozilla1.9.2 → mozilla1.9.3
We never actually call newURI for icons in the new extension manager so I believe that this is fixed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
If an invalid iconURL is specified, we don't show any icon right now (bug 576920) but the extension will still work. Marking as verified (we don't have a bug# so moving it to WFM).
Status: RESOLVED → VERIFIED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.