nttAddonCompatibilityService needs to implement QueryInterface

RESOLVED FIXED

Status

Other Applications Graveyard
Nightly Tester Tools
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: InvisibleSmiley, Unassigned)

Tracking

Details

(Whiteboard: [Sm2.9 affected])

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
I got the following in a current SeaMonkey trunk nightly with NTT 3.2 installed:

Error: (new component).QueryInterface is not a function
Source File: resource://gre/modules/XPCOMUtils.jsm
Line: 301

This is because nttAddonCompatibilityService.prototype in nttAddonCompatibilityService.js is missing a QueryInterface function. If you compare with https://developer.mozilla.org/en/XPCOMUtils.jsm, you need to implement something like this:

QueryInterface: XPCOMUtils.generateQI(
  [Components.interfaces.nsIObserver]
)

(Maybe more interfaces need to be listed, didn't check.)
Jens, are you willing to take this bug? If you don't, we will have to search for someone who will, and that won't be me: I became this extension's "caretaker" by Hobson's choice, because no one seemed willing and I felt it would be a shame to let it rot uncared-for, but this kind of fix is way above my head: my expertise doesn't run much farther than the bounds of install.rdf

Heather, Philip: if Jens doesn't take this and you know anyone willing (and able, and with enough time) to fix this bug, please add him/her to the CC list.
Whiteboard: [Sm2.9 affected]
(Reporter)

Comment 2

7 years ago
Tony, all you have to do is to add the following line in {8620c15f-30dc-4dba-a131-7c5d20cf4a29}/components/nttAddonCompatibilityService.js:

--- nttAddonCompatibilityService.js.old 2012-01-03 01:29:20.187457363 +0100
+++ nttAddonCompatibilityService.js.new 2012-01-03 01:39:36.496912579 +0100
@@ -51,6 +51,7 @@
   classDescription: "Nightly Tester Tools Addon Compatibility",
   classID: Components.ID("{126c18c5-386c-4c13-b59f-dc909e78aea0}"),
   contractID: "@mozilla.com/nightly/addoncompatibility;1",
+  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIObserver]),
 
   // nsIObserver
   observe : function(subject, topic, data) {


Note 1: Same error with Nightly (FF trunk).

Note 2: There's also a notice regarding aboutNightly.js, but it's not an error so as far as I'm concerned we can leave it:

"While creating services from category 'profile-after-change', service for entry 'AboutNightly', contract ID '@mozilla.org/network/protocol/about;1?what=nightly' does not implement nsIObserver."
status-firefox12: --- → affected

Comment 3

7 years ago
Where is the NTT repository? I hope it's a Mercurial repo and not Git as I don't know anything about Git.
(Reporter)

Comment 4

7 years ago
(In reply to Philip Chee from comment #3)
> Where is the NTT repository? I hope it's a Mercurial repo and not Git as I
> don't know anything about Git.

An outdated hg one is at http://hg.oxymoronical.com/extensions/NightlyTesterTools/; I think the current one is git: https://github.com/mozilla/nightlytt [I know nothing about git either, and who has write access to that repo.]
Yes, the "official" NTT repository is at http://github.com/mozilla/nightlytt and there are a number of "forks" of that repo on github.
For an easy start to the git CLI:
- git help is similar to hg help
- git pull is equivalent to hg fetch (pull and update)
- git fetch is equivalent to hg pull (pull and don't update)
- git seems to have a less stringent "permanent history" rule than Mercurial, which makes me nervous. Of course, with responsibly minded repo administrators (who won't f?ck with the history) it's OK.

IIUC, Heather Arthur (fayearthur@ see bug CC), and I don't know who else, has push rights to that repo. I don't.
Created attachment 585379 [details] [diff] [review]
patch v1 author=InvisibleSmiley

This is the patch from comment #2
Attachment #585379 - Flags: review?(fayearthur)
(In reply to Tony Mechelynck [:tonymec] from comment #5)
> Yes, the "official" NTT repository is at http://github.com/mozilla/nightlytt
> and there are a number of "forks" of that repo on github.
> For an easy start to the git CLI:
> - git help is similar to hg help
> - git pull is equivalent to hg fetch (pull and update)
> - git fetch is equivalent to hg pull (pull and don't update)

Oh, and I forgot: git clone is equivalent to hg clone. ;-)

> - git seems to have a less stringent "permanent history" rule than
> Mercurial, which makes me nervous. Of course, with responsibly minded repo
> administrators (who won't f?ck with the history) it's OK.
> 
> IIUC, Heather Arthur (fayearthur@ see bug CC), and I don't know who else,
> has push rights to that repo. I don't.
Attachment #585379 - Flags: review?(fayearthur) → review+
Created attachment 586350 [details]
modified extension (for testing)

Jens, can you please test this before I commit it to the master repo (and then submit it to AMO)?
Attachment #586350 - Flags: feedback?(jh)
(Reporter)

Comment 9

7 years ago
Comment on attachment 586350 [details]
modified extension (for testing)

[Note: I *only* tested that the error message is gone and the menu item is still there.]
Attachment #586350 - Flags: feedback?(jh) → feedback+
OK, let's cross fingers, <knock target=head>knock on wood</knock>, and hope for the best. I've just merged this patch into the master NTT repo at https://github.com/mozilla/nightlytt/ so it has the equivalent of "fixed on trunk" — now let's run the AMO gamut.

https://github.com/mozilla/nightlytt/commit/3116103f2de12345e71931514023156c5e87adba

I think I'll be opening recruitment for peers of this module (mostly to review patches, the admin work I can handle).
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.