After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682533 - JS ERROR: this._notification is null
JS ERROR: this._notification is null
Status: RESOLVED DUPLICATE of bug 683986
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-23 12:44 UTC by Giovanni Campagna
Modified: 2012-10-29 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Giovanni Campagna 2012-08-23 12:44:53 UTC
JS ERROR: !!!   Exception was: TypeError: this._notification is null
    JS ERROR: !!!     message = '"this._notification is null"'
    JS ERROR: !!!     fileName = '"/opt/gnome/share/gnome-shell/js/ui/messageTray.js"'
    JS ERROR: !!!     lineNumber = '2195'
    JS ERROR: !!!     stack = '"()@/opt/gnome/share/gnome-shell/js/ui/messageTray.js:2195
wrapper()@/opt/gnome/share/gjs-1.0/lang.js:204
()@/opt/gnome/share/gnome-shell/js/ui/messageTray.js:1903
wrapper()@/opt/gnome/share/gjs-1.0/lang.js:204
([object GObject_Object],3,true)@/opt/gnome/share/gnome-shell/js/ui/messageTray.js:2088
wrapper([object GObject_Object],3,true)@/opt/gnome/share/gjs-1.0/lang.js:204

and then the message tray stops working completely.

I could not find a reliable reproducer, but trying to debug it the problem is
_hideNotification() trying to access this._notification.
_hideNotification() is called from _updateState() in the following situations:
 - _notificationRemoved (_onSourceDestroy() or _onNotificationDestroy(), and both check _notification before setting, _hideNotificationCompleted clears both _notification and _notificationRemoved at the same time)
 - notificationLockedOut (true only if _notification)
 - notificationExpired (true only if _notification)

Additionally, _notification is set by _hideNotificationComplete and _showNotification, but the latter is only ever called with non-null notification argument.

So it seems to be an invariant that _notification is not null when _hideNotification() is called. Nevertheless...
Comment 1 Guillaume Desmottes 2012-10-29 08:41:28 UTC
I observed this a few times as well. The only way to get the message tray back is to restart the Shell.
Comment 2 Giovanni Campagna 2012-10-29 16:08:37 UTC
Nah, you can also just type in lg:
Main.messageTray._notificationState = imports.ui.messageTray.State.HIDDEN

Btw, I'm a real genius, and filed a duplicate with the patch...

*** This bug has been marked as a duplicate of bug 683986 ***