Closed Bug 1066623 Opened 10 years ago Closed 9 years ago

[e10s] ChatZilla add-on doesn't work with nightly in e10s mode: TypeError: target.gBrowser is undefined

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
normal

Tracking

(e10s+)

RESOLVED FIXED
Tracking Status
e10s + ---

People

(Reporter: Swarnava, Assigned: glenjamin+bmo)

References

Details

(Keywords: addon-compat, Whiteboard: [cz-0.9.91.1])

Attachments

(3 files)

chatzilla is not working after updating to latest nightly.

when i am typing irc://irc.mozilla.org , its asking me to visit mibbit instead of opening chatzilla.

when i am opening chatzilla manually from tools>Chatzilla i am seeing an error.

Screenshot attached
Which nightly is this? What OS ? Have you tried using mozregression to track down when this broke? Are you using e10s?


(FTR, I used cz on today's nightly on OS X earlier, and it worked fine)
Flags: needinfo?(swarnavasengupta)
Assignee: nobody → rginda
Blocks: e10s-addons
Component: Untriaged → ChatZilla
Flags: needinfo?(swarnavasengupta)
Product: Firefox → Other Applications
Summary: chatzilla is not working with latest nightly → ChatZilla doesn't work with nightly in e10s mode
OS: Mac OS X → All
Hardware: x86 → All
... interestingly, we don't have anything that explicitly refers to gBrowser in the CZ source tree... probably one of the utilityOverlay functions we call or something :-\
so its actually an es10 bugs.
Assignee: rginda → nobody
Component: ChatZilla → Extension Compatibility
Product: Other Applications → Firefox
Summary: ChatZilla doesn't work with nightly in e10s mode → [e10s] ChatZilla doesn't work with nightly in e10s mode
tracking-e10s: --- → ?
Keywords: addon-compat
for me chatzilla isn't running to with enabled e10s

{
  "version": 2,
  "clientID": "403cc775-8dcd-49aa-be64-eecd8ac67858",
  "clientIDVersion": 1,
  "thisPingDate": "2014-09-15",
  "geckoAppInfo": {
    "_v": 1,
    "vendor": "Mozilla",
    "name": "Firefox",
    "id": "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
    "version": "35.0a1",
    "appBuildID": "20140915030204",
    "platformVersion": "35.0a1",
    "platformBuildID": "20140915030204",
    "os": "WINNT",
    "xpcomabi": "x86-msvc",
    "updateChannel": "nightly"
  },

"{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}": {
          "userDisabled": false,
          "appDisabled": false,
          "name": "ChatZilla",
          "version": "0.9.90.1",
          "type": "extension",
          "scope": 1,
          "description": "A clean, easy to use and highly extensible Internet Relay Chat (IRC) client.",
          "foreignInstall": false,
          "hasBinaryComponents": false,
          "installDay": 16328,
          "updateDay": 16328
        },
Chatzilla said: TypeError: target.gBrowser is undefined
*
Ally: do you recognize the "TypeError: target.gBrowser is undefined" error?
Summary: [e10s] ChatZilla doesn't work with nightly in e10s mode → [e10s] ChatZilla add-on doesn't work with nightly in e10s mode: TypeError: target.gBrowser is undefined
Flags: needinfo?(ally)
From a quick skim, it looks like the cZ exception handling/printing code pre-dates the existence of the err.stack property (or at least doesn't use it).

I don't have time to dig further at the moment, but making a ChatZilla build which includes the full stack trace in the error dialog should go some way towards helping to track this down.
I did actually have time, there's the full stack trace for the above error:

TypeError: target.gBrowser is undefined
ChromeWindowInterposition.getters.content@resource://gre/modules/RemoteAddonsParent.jsm:724:7
AddonInterpositionService.prototype.interpose/desc.get@resource://gre/components/multiprocessShims.js:133:38
getObjectDetails@chrome://chatzilla/content/static.js:1618:1
__display@chrome://chatzilla/content/static.js:4646:13
init@chrome://chatzilla/content/static.js:147:5
onLoad@chrome://chatzilla/content/handlers.js:56:9
onload@chrome://chatzilla/content/chatzilla.xul:1:1
After a bit more digging, this accessor seems to have been introduced in bug 1051017 in http://hg.mozilla.org/mozilla-central/rev/d6bdd3272ccb

I'm still none-the-wiser to the meaning or origin of gBrowser.
After a bit more testing, it seems that the problem lies in the compatibility shim provided by to ease the e10s transition.

Setting the <em:multiprocessCompatible>true</em:multiprocessCompatible> flag in install.rdf disables the shims, and leaves chatzilla functional again.

I also left in the improvement to the startup error that includes the stack trace, sinde that seemed useful in general.
Assignee: nobody → glenjamin+bmo
Status: NEW → ASSIGNED
Attachment #8492608 - Flags: review?(silver)
Flags: needinfo?(ally)
See Also: → 1070516
Comment on attachment 8492608 [details] [diff] [review]
Improve statup error and declare e10s compat

Review of attachment 8492608 [details] [diff] [review]:
-----------------------------------------------------------------

::: xul/content/handlers.js
@@ +58,5 @@
>      catch (ex)
>      {
>          dd("caught exception while initializing:\n" + dumpObjectTree(ex));
> +        var exception = formatException(ex) + (ex.stack && "\n" + ex.stack);
> +        showErrorDlg(exception + "\n" + dumpObjectTree(ex));

The annoying this is that dumpObjectTree enumerates and lists all properties, so this shouldn't be needed as it should show the stack.
Attachment #8492608 - Flags: review?(silver) → review+
Can't we update formatException to always include the stack? Seems like it'd be useful wherever we end up calling that method... :-)
We use it for displaying all errors including user-facing ones like /eval, so I don't agree.
Bug 1071674 - When a e10s tab crashes (frequently), other e10s tabs crashes too https://bugzilla.mozilla.org/show_bug.cgi?id=1071674
Bug 1071655 - Can't move tabs between windows https://bugzilla.mozilla.org/show_bug.cgi?id=1071655
(In reply to :Gijs Kruitbosch from comment #13)
> Can't we update formatException to always include the stack? Seems like it'd
> be useful wherever we end up calling that method... :-)

(In reply to James Ross from comment #14)
> We use it for displaying all errors including user-facing ones like /eval,
> so I don't agree.

I did consider doing that, but only did it for the completely broken startup case for this reason.
AFAICT this (also) got fixed at some point on the Firefox side, although I have no idea how. I can't reproduce with current nightly and the currently released ChatZilla (0.9.91) which doesn't have this patch yet.
This add-on may have been fixed by the add-on compatibility shims added in bug 1017320.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
No, it was fixed by bug 1070516. However, we'd like to still land this patch to opt-out of any further compat stuff, because we're pretty much guaranteed to work considering we don't really use the main firefox window at all.
Status: RESOLVED → REOPENED
Component: Extension Compatibility → ChatZilla
Product: Firefox → Other Applications
Resolution: FIXED → ---
http://hg.mozilla.org/chatzilla/rev/a4d1ec11c950
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
chatzilla is working when i trying to open it from Tools>Chatzilla.

but when i am tryting to open chatzilla by going irc://moznet/sumo , its asking me to use mibbit or any other irc messenger.

Expected Behavior:

It should open chatzilla directly
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Swarnava Sengupta (:Swarnava) from comment #23)
> chatzilla is working when i trying to open it from Tools>Chatzilla.
> 
> but when i am tryting to open chatzilla by going irc://moznet/sumo , its
> asking me to use mibbit or any other irc messenger.
> 
> Expected Behavior:
> 
> It should open chatzilla directly

Please file a separate bug instead of reopening this one (which was about something else), and provide more details, like whether this works when e10s is turned off, etc. Probably related to bug 940206 and friends.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Okay i just filled Bug 1095484
This issue is happening again with latest nightly update.

TypeError: client.currentObject is undefined @ <chrome://chatzilla/content/static.js> 4615
*
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: [e10s] ChatZilla add-on doesn't work with nightly in e10s mode: TypeError: target.gBrowser is undefined → [e10s] ChatZilla add-on doesn't work with nightly in e10s mode: TypeError: client.currentObject is undefined
Please don't repurpose/reopen bugs for other issues. This is a new issue, and at least 2 bugs were already filed for it. There's a patch on bug 1108416.
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Resolution: --- → FIXED
Summary: [e10s] ChatZilla add-on doesn't work with nightly in e10s mode: TypeError: client.currentObject is undefined → [e10s] ChatZilla add-on doesn't work with nightly in e10s mode: TypeError: target.gBrowser is undefined
Whiteboard: [cz-0.9.91.1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: