Closed Bug 309496 Opened 19 years ago Closed 18 years ago

Firefox 1.0.7 clean install installs nsIQTScriptablePlugin.xpt to plugins folder

Categories

(Firefox :: Installer, defect)

2.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: darklight_tr, Assigned: robert.strong.bugs)

Details

(Keywords: verified1.8.1.5)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

When performing a clean install of Firefox 1.0.7, the installer places a copy of
nsIQTScriptablePlugin.xpt (Dated 09/19/05 8:37:37 AM) in the plugins directory.

This xpt is used by QuickTime, and should be installed in the components folder,
not the plugins folder.  If it should be included with the Firefox install at all.

This problem does not occur if you install 1.0.7 over a previous version of
Firefox, and also does not occur with any previous version of Firefox.

This problem occurs with both Standard and Custom Installs.

Reproducible: Always

Steps to Reproduce:
1. Uninstall any previous version of Firefox, if one is installed.
2. Delete the Mozilla Firefox program folder
3. Install Firefox 1.0.7 using Standard or Custom.
Actual Results:  
A copy of nsIQTScriptablePlugin.xpt (Dated 09/19/05 8:37:37 AM) is installed to
the plugins folder.

Expected Results:  
npnul32.dll (Dated 09/15/05 06:26:00 PM) should be the only file in the plugins
folder.

nsIQTScriptablePlugin.xpt (Dated 09/19/05 8:37:37 AM), if it is supposed to be
included with the Firefox install at all, should be installed to the components
folder, not the plugins folder.
I've done some additional investigation, and I have discovered that the problem
occurs on upgrade installs over previous versions of Firefox as well, unlike
what I had reported earlier.

I have Quicktime Alternative v1.62 installed, and I think that may have
something to do with the problem.  I upgraded a machine without Quicktime
Alternative installed and the problem did not occur.
When both of ...\components\nsIQTScriptablePlugin.xpt and ...\Plugins\nsIQTScriptablePlugin.xpt are installed, Firefox 1.5 loaded nsIQTScriptablePlugin.xpt twice(comonents first, Plugins last.)

If no nsIQTScriptablePlugin.xpt in components nor Plugins, this bug's problem can not occur, although problem of Bug 286743 will always occur.
If both nsIQTScriptablePlugin.xpt are same, problem won't occur.
If first loaded nsIQTScriptablePlugin.xpt(one in components) will becomes effective, problem may not occur usually because one in components(installed by the new Quick Time) is newer and latest.
But if last loaded nsIQTScriptablePlugin.xpt(one in Plugins) will becomes effective, problem may occur when version of nsIQTScriptablePlugin.xpt is different.

Reporter, see xpti.dat in your Firefox's profile directry by text editor.
Were both ...\components\nsIQTScriptablePlugin.xpt and ...\Plugins\nsIQTScriptablePlugin.xpt loaded in additional component initialzation of Firefox 1.0.x?
Related lines in install_wizard1.log(Win-2K,Fx 1.5.0.x) and xpti.dat. 

(C:\Program Files\Mozilla Firefox\uninstall\install_wizard1.log)
> ** Copied QuickTime xpt file
>    from 'C:\Program Files\QuickTime\Plugins\nsIQTScriptablePlugin.xpt'
>      to 'C:\Program Files\Mozilla Firefox\plugins\nsIQTScriptablePlugin.xpt\'

(xpti.dat in Firefox's profile directory)
> [Directories,4]
> 0,C:\Program Files\Mozilla Firefox\components
> 1,C:\Program Files\Mozilla Firefox\extensions\inspector@mozilla.org\components
> 2,C:\Program Files\Mozilla Firefox\extensions\talkback@mozilla.org\components
> 3,C:\Program Files\Mozilla Firefox\plugins
> [Files,4]
> 0,browser.xpt,0,297644,1155015847075
> 1,inspector.xpt,1,2969,1155015866763
> 2,qfaservices.xpt,2,144,1155015884409
> 3,nsIQTScriptablePlugin.xpt,3,2394,1152373443939

As I said in comment #2, nsIQTScriptablePlugin.xpt was listed twice in [Files,4] section when the .xpi file existed in both plugins(by Firefox installer when Quicktime is already installed) and components(by Quicktime installer when Firefox is already installed).
Taking to get this on my radar
Assignee: nobody → robert.bugzilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
nsPluginDirServiceProvider already scans for an existing install of QuickTime so at the very least we don't have to copy the dll's... waiting on an answer regarding the xpt.
http://lxr.mozilla.org/seamonkey/source/modules/plugin/base/src/nsPluginDirServiceProvider.cpp#414
If we have to copy nsIQTScriptablePlugin.xpt this copies it into the components dir. We may not even have to do that so I am holding off on asking for review until I get this confirmed.
Comment on attachment 255320 [details] [diff] [review]
patch - copy nsIQTScriptablePlugin.xpt into the components dir

Seth, since QuickTime installs its xpt into out components directory I am also installing it into the components directory instead of our plugins directory. Also, nsPluginDirServiceProvider finds the plugin dll's just fine so we don't need to copy them.
Attachment #255320 - Flags: review?(sspitzer)
To test that QuickTime is scriptable thanks to jst.
go to

http://www.apple.com/trailers/independent/thebridge/trailer/

and type this in the URL bar:

javascript:alert(document.embeds[0].Play)

if it is scriptable the alert will display
funtion Play() {
    [native code]
}

if it is not the alert will display
undefined
Comment on attachment 255320 [details] [diff] [review]
patch - copy nsIQTScriptablePlugin.xpt into the components dir

r=sspitzer, one nit:

compnents  -> components
Attachment #255320 - Flags: review?(sspitzer) → review+
Checked in to trunk
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attachment #255320 - Attachment is obsolete: true
Attachment #255388 - Flags: review+
Comment on attachment 255388 [details] [diff] [review]
as checked in with typo fixed

I'd like to get this for 1.8.1.5. There has been a report in the forums of the npqtplugin2.dll being in use during an install without the app running and this will fix that.
Attachment #255388 - Flags: approval1.8.1.5?
Flags: blocking1.8.1.5?
thanks for the clear explanation of benefit in comment 12
Flags: blocking1.8.1.5? → blocking1.8.1.5+
Comment on attachment 255388 [details] [diff] [review]
as checked in with typo fixed

approved for 1.8.1.5, a=dveditz for release-drivers
Attachment #255388 - Flags: approval1.8.1.5? → approval1.8.1.5+
Checked into MOZILLA_1_8_BRANCH

Checking in browser/installer/windows/nsis/installer.nsi;
/cvsroot/mozilla/browser/installer/windows/nsis/installer.nsi,v  <--  installer.nsi
new revision: 1.3.2.23; previous revision: 1.3.2.22
done
Keywords: fixed1.8.1.5
Version: unspecified → 2.0 Branch
When I type javascript:alert(document.embeds[0].Play); and hit enter, I get:

Error: uncaught exception: [Exception... "Could not convert JavaScript argument"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: javascript:alert(document.embeds[0].Play); :: <TOP_LEVEL> :: line 1"  data: no]

When I make a typo, such as (document.embed[0].Play), it knows that embed is not a property of |document|, so I'm not sure what's going on here.

Rob, please let me know what additional information you need from me.

Build I used: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.5pre) Gecko/20070710 BonEcho/2.0.0.5pre
It appears that things have regressed outside of this bug in that putting all of the files back where they were previously and re-registerring all components, etc. also exhibits the same error you cited.
The reason that error occurs is because apple.com switched over to using <object> tags instead of <embed>s, so document.embeds[0] is undefined and alert() doesn't like that.

If I'm understanding this bug right, I think what we need to focus on is that the nsIQTScriptablePlugin.xpt file (if it's installed, which it may not be) gets copied over from C:\Program Files\Quicktime\Plugins into the components\ directory of the Firefox install.
(In reply to comment #18)

<snip>
 
> If I'm understanding this bug right, I think what we need to focus on is that
> the nsIQTScriptablePlugin.xpt file (if it's installed, which it may not be)
> gets copied over from C:\Program Files\Quicktime\Plugins into the components\
> directory of the Firefox install.

Makes sense; I have an nsIQTScriptablePlugin.xpt file whose timestamp is offset by two months, i.e. 5/1/2007, when the files around it are from today, 7/10/2007.

I'm not exactly sure where to find a testcase from which to enter the JavaScript from https://bugzilla.mozilla.org/show_bug.cgi?id=309496#c8, but otherwise this looks good.
So my first paragraph in comment 18 is wrong -- document.embeds does get <object> tags (at least sometimes...). I'm really not sure what's going on here since now I'm getting a different error when I try the testcase in comment 8:

Error: Bad NPObject as private data!
Source File: javascript:alert(document.embeds[0].Play);
Line: 1

That said, I think this issue is probably a different bug, no? Since this bug was about the installer copying the plug-in file over.
I believe it is a different issue. When / if I have time I'll try to track down what is going on and any help here would be appreciated. Thanks!
I'm verifying based on my testing and comment in https://bugzilla.mozilla.org/show_bug.cgi?id=309496#c19.  I'll work with Rob / jst to spin off the other issues.

Replacing fixed1.8.1.5 keyword with verified1.8.1.5 based on yesterday's testing  in comment 19.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: