Gnome-shell-extension-gsconnect: JS ERROR: TypeError: this._settings is null

Created on 4 May 2020  路  21Comments  路  Source: GSConnect/gnome-shell-extension-gsconnect

Describe the bug

The system journal is spammed with the following error:

May 03 20:38:17 dUsTiN-Desktop gnome-shell[1388526]: JS ERROR: TypeError: this._settings is null
                                                     _sync@resource:///org/gnome/shell/ui/dateMenu.js:507:28
                                                     _updateCount@resource:///org/gnome/shell/ui/dateMenu.js:503:14
                                                     _onNotificationShow@resource:///org/gnome/shell/ui/messageTray.js:1172:22
                                                     showNotification@resource:///org/gnome/shell/ui/messageTray.js:860:18
                                                     addNotification@/home/dustin/.local/share/gnome-shell/extensions/[email protected]/shell/notification.js:257:18
                                                     AddNotificationAsync@resource:///org/gnome/shell/ui/notificationDaemon.js:815:16
                                                     _handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:371:35
                                                     _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:404:34

Steps To Reproduce:

  1. Install the extension on Ubuntu 20.04
  2. After some notifications are shown check the system journal.

Expected behavior

Do not spam the log with error messages.

Screenshots

N/A

Support Log

See description above.

System Details (please complete the following information):

  • GSConnect version: 37

    • Installed from: GNOME Extensions Website

  • GNOME/Shell version: 3.36.1
  • Distro/Release: Ubuntu 20.04

GSConnect environment (if applicable):

  • Paired Device(s): Pixel 4 XL, Galaxy Tab S6
  • KDE Connect app version: 1.13.7
  • Plugin(s): N/A

Additional Notes:

N/A

needs info

All 21 comments

Did you update GSConnect without restarting gnome-shell?

Does this happen with other notifications, or only those from remote devices?

Can you try this zip to see if it fixes the problem (instructions):

[email protected]

@andyholmes Sorry for the delayed response. I've only received one notification since installing the version you provided but the error did not get thrown. I'll check the logs again tomorrow to be sure and let you know.

@andyholmes It does appear to be resolved by your changes. Thanks!!

Great, that was merged in 0a10721 so I'll close this one up and do another release candidate tonight. Thanks for reporting and testing.

@andyholmes Actually I spoke to soon. The error is back and its even more spammy than it was before (though that fact could just be variance in the number of notifications I received today vs other days I checked it)

Is it still the same backtrace? I'm guessing something is holding a reference somewhere to the notification source.

Yeah its the same one but the line number is of course different after the changes you made to the file:

May 11 21:47:57 dUsTiN-Desktop gnome-shell[33147]: JS ERROR: TypeError: this._settings is null
                                                   _sync@resource:///org/gnome/shell/ui/dateMenu.js:507:28
                                                   _updateCount@resource:///org/gnome/shell/ui/dateMenu.js:503:14
                                                   countUpdated@resource:///org/gnome/shell/ui/messageTray.js:791:15
                                                   set acknowledged@resource:///org/gnome/shell/ui/messageTray.js:451:14
                                                   _updateShowingNotification@resource:///org/gnome/shell/ui/messageTray.js:1391:9
                                                   _showNotification@resource:///org/gnome/shell/ui/messageTray.js:1371:14
                                                   _updateState@resource:///org/gnome/shell/ui/messageTray.js:1313:26
                                                   _onNotificationShow@resource:///org/gnome/shell/ui/messageTray.js:1175:14
                                                   showNotification@resource:///org/gnome/shell/ui/messageTray.js:860:18
                                                   addNotification@/home/dustin/.local/share/gnome-shell/extensions/[email protected]/shell/notification.js:273:18
                                                   AddNotificationAsync@resource:///org/gnome/shell/ui/notificationDaemon.js:815:16
                                                   _handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:371:35
                                                   _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:404:34
May 11 21:47:57 dUsTiN-Desktop gnome-shell[33147]: JS ERROR: TypeError: this._settings is null
                                                   _sync@resource:///org/gnome/shell/ui/dateMenu.js:507:28
                                                   _updateCount@resource:///org/gnome/shell/ui/dateMenu.js:503:14
                                                   countUpdated@resource:///org/gnome/shell/ui/messageTray.js:791:15
                                                   set acknowledged@resource:///org/gnome/shell/ui/messageTray.js:451:14
                                                   _updateShowingNotification@resource:///org/gnome/shell/ui/messageTray.js:1391:9
                                                   _showNotification@resource:///org/gnome/shell/ui/messageTray.js:1371:14
                                                   _updateState@resource:///org/gnome/shell/ui/messageTray.js:1313:26
                                                   _onNotificationShow@resource:///org/gnome/shell/ui/messageTray.js:1175:14
                                                   showNotification@resource:///org/gnome/shell/ui/messageTray.js:860:18
                                                   addNotification@/home/dustin/.local/share/gnome-shell/extensions/[email protected]/shell/notification.js:273:18
                                                   AddNotificationAsync@resource:///org/gnome/shell/ui/notificationDaemon.js:815:16
                                                   _handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:371:35
                                                   _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:404:34
May 11 21:47:57 dUsTiN-Desktop gnome-shell[33147]: JS ERROR: TypeError: this._settings is null
                                                   _sync@resource:///org/gnome/shell/ui/dateMenu.js:507:28
                                                   _updateCount@resource:///org/gnome/shell/ui/dateMenu.js:503:14
                                                   countUpdated@resource:///org/gnome/shell/ui/messageTray.js:791:15
                                                   set acknowledged@resource:///org/gnome/shell/ui/messageTray.js:451:14
                                                   _updateShowingNotification@resource:///org/gnome/shell/ui/messageTray.js:1391:9
                                                   _showNotification@resource:///org/gnome/shell/ui/messageTray.js:1371:14
                                                   _updateState@resource:///org/gnome/shell/ui/messageTray.js:1313:26
                                                   _onNotificationShow@resource:///org/gnome/shell/ui/messageTray.js:1175:14
                                                   showNotification@resource:///org/gnome/shell/ui/messageTray.js:860:18
                                                   addNotification@/home/dustin/.local/share/gnome-shell/extensions/[email protected]/shell/notification.js:273:18
                                                   AddNotificationAsync@resource:///org/gnome/shell/ui/notificationDaemon.js:815:16
                                                   _handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:371:35
                                                   _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:404:34

What I am confused by is how it's possible that something in the extension is causing this error to occur so deep in a call chain of gnome-shell owned functions.

What I am confused by is how it's possible that something in the extension is causing this error to occur so deep in a call chain of gnome-shell owned functions.

Basically we just override a few functions here and there to do things like insert "quick reply" entries or notify GSConnect when an notification is closed. That's why our function is right in middle of the stack.

I'm not sure how this is happening since I can't reproduce this, but I'll keep trying. Is it possible you're using any other extensions that modify notifications?

I see. None of the other extensions I'm using do anything related to notifications (at least I don't think they do). If I can find the time I will also try to debug it and let you know what I find.

Sure, it seems like the stack trace changed a little bit, but still ultimately happens in the same place.

The specific TypeError is happening in the little notification dot that appears beside the date/time in the panel. I believe that dot gets shown when you receive three or more notifications without acknowledging them.

The code resulting in the TypeError is this snippet:

        this.connect('destroy', () => {
            this._settings.run_dispose();
            this._settings = null;
        });

I can make the dot appear by sending some test notifications from my phone, but I can't get that stack trace still.

That helps a lot. I think this is caused by another extension only I'm not sure which one. I will figure that out and let you know in case this comes up again.

Okay I looked it over again and I'm not sure but if I had to guess I think it has to do with this extension: https://extensions.gnome.org/extension/921/multi-monitors-add-on/~~

I have it set to show the date on only one monitor. Will have more time to look into it this weekend.

Honestly I could have sworn I remembered either an extension or a setting somewhere that disabled the notification dot that shows next to the date. I can't seem to find such a thing enabled anywhere on my system though but I know I'm not imagining it. Again, will look into it this weekend and report back.

Is this one still valid, not sure if you forgot by I definitely did :)

Yeah its definitely not resolved. I switched back to KDE last month so this issue doesn't affect me anymore. I sure did forget about it too, ngl :sweat_smile:

Okay, well since I can't reproduce this myself I'll leave this for awhile to see if anyone else can reproduce, but otherwise I'll just close it. I still suspect this is being caused by another extension.

Going to close this one now, but feel free to open if another user can reproduce.

Hey @andyholmes I've been getting this exact error with GSConnect v44 with GNOME Shell 3.38.1 on Fedora 33.

I actually discovered this because (I'm pretty sure) this NPE is triggering an SELinux AVC denial for low memory access.
The following stack trace is what gets spammed to the system journal, coinciding with every denial logged by setroubleshootd:

JS ERROR: TypeError: this._settings is null
_sync@resource:///org/gnome/shell/ui/dateMenu.js:715:28
_updateCount@resource:///org/gnome/shell/ui/dateMenu.js:711:14
countUpdated@resource:///org/gnome/shell/ui/messageTray.js:717:15
pushNotification@resource:///org/gnome/shell/ui/messageTray.js:778:14
showNotification@resource:///org/gnome/shell/ui/messageTray.js:783:14
processNotification@resource:///org/gnome/shell/ui/notificationDaemon.js:424:18
_notifyForSource@resource:///org/gnome/shell/ui/notificationDaemon.js:311:16
NotifyAsync@resource:///org/gnome/shell/ui/notificationDaemon.js:212:14
_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:371:35
_wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:404:34

Can we reopen this issue? Happy to help debug if I can!

Sure, re-opened. Since I can't reproduce this and there's no stack trace entries for GSConnect code I don't know how much help I can be though.

i have the same error but i don't have this extension ,i do have the multi monitor extension that referred above

i have this problem too with multi-monitors-add-on extension "version": 21
gnome-shell[3428]: JS ERROR: TypeError: this._settings is null#012_sync@resource:///org/gnome/shell/ui/dateMenu.js:525:28#012_updateCount@resource:///org/gnome/shell/ui/dateMenu.js:521:14#012countUpdated@resource:///org/gnome/shell/ui/messageTray.js:788:15#012set acknowledged@resource:///org/gnome/shell/ui/messageTray.js:448:14#012_updateShowingNotification@resource:///org/gnome/shell/ui/messageTray.js:1388:9#012_showNotification@resource:///org/gnome/shell/ui/messageTray.js:1368:14#012_updateState@resource:///org/gnome/shell/ui/messageTray.js:1310:26#012_onNotificationShow@resource:///org/gnome/shell/ui/messageTray.js:1172:14#012showNotification@resource:///org/gnome/shell/ui/messageTray.js:857:18#012_onWindowDemandsAttention@resource:///org/gnome/shell/ui/windowAttentionHandler.js:48:16

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rugk picture rugk  路  4Comments

danieldeng2 picture danieldeng2  路  4Comments

jeetsrs picture jeetsrs  路  4Comments

daleosm picture daleosm  路  6Comments

amivaleo picture amivaleo  路  3Comments