Closed Bug 302222 Opened 20 years ago Closed 17 years ago

InstallTrigger.getVersion always returns null for already installed extension in firefox

Categories

(Toolkit :: Add-ons Manager, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: maheshpisal, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 When you try to call InstallTrigger.getVersion(<extn. name>) in javascript from a webpage to check if a specified extension is installed, the function always returns null even if the exnteion is properly installed. The installed extension is displayed by extension manager and works as expected. Reproducible: Always Steps to Reproduce: 1.Install an extension (xyz.xpi) which has install.rdf and all relevent files. 2.Verify that the extension is installed using exntesion manager and is functioning as expected. 3.Now from a test html page, in javacript code, try to see if the extension version by calling InstallTrigger.getVersion(). InstallTrigger.getVersion() returns null. Actual Results: InstallTrigger.getVersion() returns null. Expected Results: InstallTrigger.getVersion() should have returned the version which I specified in install.rdf.
Perhaps we should drop the old xpinstall install registry for the new toolkit and use the EM to provide this information (xulrunner will have a similar registry of installed applications). This is a feature, since the getVersion thing never was intended to work for extensions, only old-style XPIs.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Installer → Extension/Theme Manager
Ever confirmed: true
QA Contact: installer → extension.manager
*** Bug 302224 has been marked as a duplicate of this bug. ***
This would only be allowed if the site is in the whitelist and allow sites to install software is enabled... true?
Adding the site to whitelist does not solve the problem. I even tried by copying the html file on to local machine and checking if it returns the version, but no luck.
I didn't think it would. I was verifying that these calls would respect these settings since if they didn't any site could get this info without the user granting the site the priv or the user knowing it.
InstallTrigger.getVersion() does indeed respect the install whitelist, and should for privacy reasons. As noted in comment #1 though this is intimately tied to the (old-style) xpinstall version registry which is bypassed by the new install.rdf extension manager stuff. It would be useful to tie the two, though (while still respecting the whitelist)
InstallTrigger.getVersion no longer exists.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.