Closed
Bug 85564
Opened 25 years ago
Closed 25 years ago
InstallTrigger.getVersion returns NULL when the component has been installed
Categories
(SeaMonkey :: Installer, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jprice, Assigned: ssu0262)
Details
(Whiteboard: pdt+ critical for 0.9.2)
Attachments
(2 files)
|
2.96 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.94 KB,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DigExt)
BuildID: 2001052904 /0.9.1
It appears that in 0.9.1 that InstallTrigger.getVersion does not return a valid
version within a web page until an install has been attempted in that browser.
That is, calling InstallTrigger.getVersion() will return null when there has
been a valid version installed. If the same check is done in the install.js of
a XPI file the return is correct. If the install is attempted (the install.js
is run) and cancelled, then the InstallTrigger.getVersion call becomes valid
until the browser is shut down. This was not an issue in 6.01.
Reproducible: Always
Steps to Reproduce:
1. Install a XPI component (setting the version as you do)...
2. Restart the browser.
3. Load a page that detects the installed version of a XPI component (per the
browser registry using InstallTrigger.getVersion). InstallTrigger.getVersion
returns null.
4. Invoke the XPI again, cancel the install, then check the version again
(without restarting the browser). The correct value will be there.
Actual Results: The version of an installed component was not returned, making
it a tad bit dificult to decide whether an update is needed:)
Expected Results: InstallTrigger.getVersion() to return the version in
mozver.dat.
If you need test pages, let me know and i'll send them...
| Reporter | ||
Comment 1•25 years ago
|
||
Quick update. First I think I had this asigned to the wrong component. Second,
I have now confirmed the bug on Netscape 6.1 Preview Release.
Comment 2•25 years ago
|
||
ssu,
this one prevents component vendors from determining component version, so using
XPInstall trigger scripts they can never figure out whether to upgrade :-(
nominating 0.9.2.
Keywords: mozilla0.9.2
Priority: -- → P1
Comment 3•25 years ago
|
||
confirming. reporter, can you post attachments? i can do so, but i'm assuming
you have some trigger scripts handy that demonstrate this. Also, putting pdt+
in the status whiteboard. pdt has given permission to work on this for 0.9.2 --
change milestone whenever possible.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 4•25 years ago
|
||
Here's the test code I've been using (i believe the XPI is web visible, if not
just modify the script to point to your favorite xpi file):
<html>
<head>
<title>Bug test page</title>
</head>
<body leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
<script>
function triggerXPI()
{
var XPIFileName
= "http://ea2.str.ea.com/downloads/games/common/boot_strap/NPGils.xpi";
try
{
var xpiLeaf = XPIFileName;
xpiObj = new Object();
if(!InstallTrigger.updateEnabled())
{
alert("Please enable \"Software
Installation\" under the Avdanced tab in your Netscape Preferences.");
return false;
}
else
{
xpiObj[xpiLeaf] = xpiLeaf;
// alert(xpiLeaf);
InstallTrigger.install(xpiObj, xpiCB);
}
}
catch(e)
{
alert(e);
}
}
function xpiCB(url, status)
{
//succeded, or not needed
if (status == 0)
{
alert("Please follow the direction of the intstaller. Once the
installation is complete it will be nescessary to restart the browser to
complete the installation (all browser windows must be closed).");
}
else if (status == -227)
{
alert("Component install was cancelled by install.js. Prolly
becasue the component is already already up to date");
}
else
{
alert("An error has been encountered while installing required
software(" + status + ").");
}
//window.close();
// alert(status+": "+url);
}
function TestVersion()
{
try
{
regName = "EACOMGILS";
jarSrc = "gilssetup.exe";
var version = "1.1.0.0";
compValue = InstallTrigger.CompareVersion(regName, version);
alert("compValue: " + compValue);
}catch(e)
{
alert("Error: " + e);
}
}
</script>
<br><br>
<a href="javascript:TestVersion();">Test Version</a>
<a href="javascript:triggerXPI();">triggerXPI</a>
</body>
</html>
Comment 5•25 years ago
|
||
Jeff,
Thanks for all the info. Another piece of info. we'd like is -- can we see your
actual install script? The one included above in the link to the *.xpi doesn't
mention how you do a CompareVersion. You mentioned it works in your install
script, and I'd like to see what API you're using. Another suggestion: have you
tried doing a GetVersion rather than a CompareVersion? Using GetVersion, you
could do some mathematical manipulation and do a version check. This is,
however, definitely a bug.
Comment 6•25 years ago
|
||
just to clarify: this mentions CompareVersion, but your initial summary mentions
getVersion. Are they both at flaw?
Comment 7•25 years ago
|
||
Marking pdt+ in status whiteboard. ssu, based on our informal discussion in my
cube, do you think this is a bug? could you do a brain dump in the bug log here
as to why (or why not) this is a problem?
Whiteboard: pdt+
| Reporter | ||
Comment 8•25 years ago
|
||
Both CompareVersion and getVersion return appear to be broken.
Comment 10•25 years ago
|
||
Syd,
I gave it a PDT+ after meeting with PDT (selmer et al.) last week (Wednesday).
| Assignee | ||
Comment 11•25 years ago
|
||
Comment 12•25 years ago
|
||
r=sgehani contingent upon building on the mac.
Comment 13•25 years ago
|
||
sr=mscott
| Assignee | ||
Comment 14•25 years ago
|
||
Comment 15•25 years ago
|
||
a=blizzard on behalf of drivers for 0.9.2
Whiteboard: pdt+ → pdt+ critical for 0.9.2
| Assignee | ||
Comment 16•25 years ago
|
||
patch checked in. Let me know if you're still having problems with these two
functions.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 17•25 years ago
|
||
verified on branch builds 2001071606(mozilla), 2001071306(N6)---Windows
2001071603 (Mac)
adding vtrunk as reminder to verify on trunk
Keywords: vtrunk
Comment 18•24 years ago
|
||
verified on trunk build 2001091705
Status: RESOLVED → VERIFIED
Keywords: vtrunk
Updated•21 years ago
|
Product: Browser → Seamonkey
Component: Installer: XPI Packages → Installer
QA Contact: agracebush → general
You need to log in
before you can comment on or make changes to this bug.
Description
•