Closed Bug 251379 Opened 20 years ago Closed 7 years ago

install.rdf parsing fails with an alert stating that the addon was incompatible

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
mozilla2.0

People

(Reporter: chantepie, Unassigned)

References

Details

(Whiteboard: [Triaged 9/2/12])

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 When the install.rdf is malformed xpi package install fails without telling it was the RDF which is malformed. Reproducible: Always Steps to Reproduce: 1. Write an XPI install.rdf 2. add malformed element '<em:updateURL>http://myhost.com/update.rdf?pkgid=xxx&cid=yyy</em:updateURL>' 3. Make the .xpi file containing malformd install.rdf and try to open it with firefox Actual Results: Tells the package "[...] will only works with Firefox (null)" Expected Results: Telling that the package install manifest (install.rdf) is malformed and possibility telling what's wrong with that
Attached file Malformed install.rdf example (deleted) —
-> firefox. there's no install.rdf in mozilla packages.
Assignee: xpi-packages → bugs
Component: Installer: XPI Packages → Extension/Theme Manager
Product: Browser → Firefox
QA Contact: bugs
Patches are welcome... I believe you want to wrap http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/extensions/src/nsExtensionManager.js.in#470 in a try/catch block and call showMalformedError() if the GetDataSourceBlocking call fails.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 248125
Whiteboard: [asaP1]
It's just ignoring the "bad" arc for me. If the manifest is severely broken, an error message is shown (but see bug 292854). Current behavior makes sense to me. It's not an excuse for Firefox not logging error messages appropriately, but extension authors can check their install.rdf using http://www.w3.org/RDF/Validator/ Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050428 Firefox/1.0+
Is this still an issue in the new update world?
(In reply to comment #5) No errors beside one in js console when extension is added to EM: Error: not well-formed Source File: file:///F:/ADMIN/install-1ww..rdf Line: 25, Column: 58 Source Code: '<em:updateURL>http://myhost.com/update.rdf?pkgid=xxx&cid=yyy</em:updateURL>' After restart chrome.manifest is empty / extension is not usable -> shouldn't been allowed to be installed ?. Also alert box would be rather better than error in js console. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050716 Firefox/1.0+
The error in the JS console is from the XML parser itself and is not really suppressable. If you want a better error we're going to have to figure out a way to get the RDF service to hand a useful error back up the line from nsIRDFService.GetDataSource, which is not easy at all.
Assignee: bugs → nobody
QA Contact: bugs → extension.manager
Attached file xpi testcase (deleted) —
I got an alert when trying to install it stating that the extension was not compatible (e.g. incorrect error) and the message in the js console stating that the rdf was not well formed. This isn't something a user would normally see unless of course an extension author distributed an extension without trying to install it first. This should be fixed but isn't a priority.
No longer blocks: 248125
OS: Linux → All
Hardware: PC → All
Summary: install.rdf parsing fails silently not telling it was the rdf which is malformed → install.rdf parsing fails with an alert stating that the addon was incompatible
Re: comment #7 - I'd be happy with an error being passed back up from the bowels of nsIRDFService that caused the top level to throw a dialog box "Malformed .rfd - see error console for details". Or does that code really not send back different return codes for "busticated" and "not compatible"?
Product: Firefox → Toolkit
Target Milestone: --- → mozilla1.9.2
Target Milestone: mozilla1.9.2 → mozilla1.9.3
Still an issue in the new Add-ons Manager.
Whiteboard: [asaP1] → [Triaged 9/2/12]
Gven that add-ons are moving to WebExtensions and have no install.rdf, we'll close this bug.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: