local Addon Install fails with "targetAppInfo is undefined" Error

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
8 years ago
8 years ago

People

(Reporter: pjdkrunkt, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

469.79 KB, application/x-xpinstall
Details
(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b8pre) Gecko/20101009 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b8pre) Gecko/20101009 Firefox/4.0b8pre

In the latest nightlies, when I attempt to locally install Extensions or Themes by dragging and dropping into the AOM, installation fails.  I'm getting the following message in a doorhanger notification:

"This addon cannot be installed because it appears to be corrupt."

In the Error Console I'm seeing this Warning:

"Warning: WARN addons.xpi: Invalid XPI: TypeError: targetAppInfo is undefined"

Installs from addons.mozilla.org appear to work fine.  

Reproducible: Always
I saw that sometimes when dragging an addon into the addon manager tab.

Dragging that same addon into some other tab had it prompt for installation.
(Reporter)

Comment 2

8 years ago
Indeed, you are correct.  I thought that dragging into different tabs would attempt to open the file.
Component: General → Add-ons Manager
Product: Firefox → Toolkit
QA Contact: general → add-ons.manager
Summary: Local addon installs fail, Invalid XPI Warning. → local Addon Install fails with "targetAppInfo is undefined" Error
Version: unspecified → Trunk
Probably similar to bug 602656. Does it happen with all kinds of add-ons? Do you have an example of a broken xpi, you can attach to this bug?
(Reporter)

Comment 4

8 years ago
As I said, it happens with both Themes and Extensions.  If you drag a JAR or XPI file into the Addons Manager, you get the same error, it doesn't matter.  If you drag either into any tab other than the Addons Manager, the install works beautifully.  The Addons Manager doesn't even have to be open for the install to work.  

I have only tried with the Themes and Extensions I have authored, but I can try ones by different authors later tonight to rule out the possibility of my zipping software being the issue.
Have you tested with a clean profile?
Created attachment 482440 [details]
Example addon

Here's an addon that's doing it for me.

I couldn't reproduce this in a clean profile, though.
What add-ons do you have installed?
DOM Inspector 2.0.8
Screengrab 0.96.3
Stylish 1.0.11
Omnibar 0.7.2.20100912
RT Site Extender 1.2.0.20100927
Firebug 1.7X.0a3
Google Gears 0.5.36.0
Add-on Compatibility Reporter 0.6
Element Hiding Helper for Adblock Plus 1.1a.20101009
Adblock Plus 1.3a.20101009
Greasemonkey 0.8.20100408.6.3
Bugzilla Tweaks 1.4
NoScript 2.0.3.4rc2
IE9 Taskbar Tasks Emulator 1.0b2
Echofon 1.9.7


Although now when I try installing that addon, it works just fine with my normal profile, so I have no idea what's going on.
(Reporter)

Comment 9

8 years ago
This behavior is no longer happening for me in today's build: 20101011 running in the same profile with same addons as in the 20101009 build.
Patrick and Wes, could both of you run that older build which was affected? Would be good to know if it still can be reproduced there but not in an up-to-date build. If there is no way to reproduce it we should probably close this bug as incomplete.
My suspicion is that this would be an error from an extension, the only occurrence of targetAppInfo in the tree is in a place where short of a JS bug it would be impossible for it to become undefined.

Add-on Compatibility Reporter would be my first guess if only because it has code that runs in the add-ons manager window. Patrick, do you run with ACR installed?
(Reporter)

Comment 12

8 years ago
Just downloaded Oct9 build from: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2010-10-09-04-mozilla-central/ and I cannot reproduce.  It was either a profile issue or something screwy with the update that got fixed in the next download.
(Reporter)

Comment 13

8 years ago
The only extension I had in common with Wes in that profile was DOM Inspector.  I did however have compatibility checking disabled via about:config.  The only other extensions running where:

Generic Chrome CSS Loader
Combine Buttons (what I was testing)

The extensions that Java loads were disabled, and I was running the default theme.  It's a fairly clean profile and I think compatibility checking was the only about:config pref I had running.  I can try to add those things back into the new profile later tonight and see if I can reproduce.
(Reporter)

Comment 14

8 years ago
I'm really beginning to think it's related to the about:config setting:

extensions.checkCompatibility.4.0b;false

Running 20101012 build in my old profile the problem started happening again.  I tested with other extensions like DOM Inspector so I can confirm it's not the files that are actually corrupt.

I clicked the "Enable" button in the compatibility warning in the Add-ons Manager which removes the pref and restarted.  The behavior stopped.

I switched to a *totally new* profile.  There are no themes, no extensions, and no non-default settings or preferences.  Extensions and themes do install normally.  I added the checkCompatibility pref and immediately the behavior began.  I clicked "Enable" on the compatibility warning and restarted and the behavior stopped.
Are you still able to reproduce this issue with the latest nightly build? If yes, can you please give exact steps how to get into this situation? I tried it a couple of times but everything is fine for me on XP.
(Reporter)

Comment 16

8 years ago
Something has changed and this specific bug is no longer reproducible for me.

In the latest builds you can no longer install addons in any other window than the Addons Manager, and not when the Addons Manager is open to the Get Addons panel.  

A few days ago instead of getting this error, sometimes installs just failed.  I tried to find a pattern with a fresh profile and clean install and it just seems random.  Every now and then when I tried to install an addon, the browser seemed to hang for a second and then nothing happens.

I have not seen this behavior today, but it was difficult to reproduce.
(In reply to comment #16)
> Something has changed and this specific bug is no longer reproducible for me.

That's great, does that mean we can close this bug?

> In the latest builds you can no longer install addons in any other window than
> the Addons Manager, and not when the Addons Manager is open to the Get Addons
> panel.  
>
> A few days ago instead of getting this error, sometimes installs just failed. 
> I tried to find a pattern with a fresh profile and clean install and it just
> seems random.  Every now and then when I tried to install an addon, the browser
> seemed to hang for a second and then nothing happens.
> 
> I have not seen this behavior today, but it was difficult to reproduce.

Wait what? Is this a different bug?
(Reporter)

Comment 18

8 years ago
I spoke too soon.  It's the same bug.  Still happening in build Gecko/20101029.  Sometimes the warning window doesn't fire but when the browser is pausing it's sending that "targetAppInfo" error to the Error Console.  Once it starts happening, it happens with *any* addon I try until I close out and restart.  

I worked all day on a theme which requires installing and restarting over and over again and saw no problems until a few minutes ago.  As soon as I saw it I created a new profile to reproduce.  After I set checkCompatibility.4.0b to false and did about four installs it started happening again.
Are you trying to install those in a row without a restart in-between? Is there a special add-on which is triggering this behavior?
(Reporter)

Comment 20

8 years ago
Not trying to reinstall without a restart, restarting every time.  It happens so rarely that I only catch it starting with my own addons... Combine Buttons and Stratini Padded being the ones I'm working on right now.  I have seen it with others by other authors but as these are the ones I'm installing most often, these are the ones I notice it with.

Comment 21

8 years ago
I am seeing this behavior for Shreeder version 3.3a1pre (Mozilla/5.0 (X11; Linux i686; rv:2.0b8pre) Gecko/20101011 Thunderbird/3.3a1pre) for Linux. 
I can install the same extension on FF 4.0b8 and SeaMonkey 2.1* without any probelem.
About which extension are you talking?

Comment 23

8 years ago
My own extension that I am developing.
Would you mind uploading the extension or sending it to us so we can have a working testcase for this particular issue? That would be fantastic. Thanks.

Comment 25

8 years ago
I cannot reproduce the problem any more. I made some changes the Thunderbird version in target-app element. I have no problem in installing the add-on.
And you do not remember which changes have been fixed that? You don't have the former version available?
We should now be logging some additional information for errors, can people who can still reproduce this copy the error from the error console to this bug report.
Are people still seeing this and can provide the info requested in comment 27? If not I'll close this as INCOMPLETE.
(Reporter)

Comment 29

8 years ago
I haven't seen it happening for several weeks now.  When it was happening, it was consistently popping up the error exactly as I posted in the report.
Thanks Patrick. Feel free to reopen once it start to happen again.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.