projecthamster / hamster-shell-extension

Shell extension for hamster
http://projecthamster.org
GNU General Public License v3.0
217 stars 92 forks source link

GNOME-45 Hamster widget disappears and cannot be restarted from the extensions manager #365

Open lefterav opened 10 months ago

lefterav commented 10 months ago

every now and then the hamster widget disappears. The message at journal is

Jan 13 15:43:37 nubi gnome-shell[1020865]: Shutting down hamster-shell-extension.
Jan 13 16:20:11 nubi gnome-shell[1020865]: Shutting down hamster-shell-extension.
Jan 13 16:59:35 nubi gnome-shell[1020865]: Shutting down hamster-shell-extension.
Jan 13 17:29:06 nubi gnome-shell[1020865]: Shutting down hamster-shell-extension.

Then I went to extension manager, I disabled and re-enabled the hamster extension from the switch. The Extension manager displayed a red dead-end sign and the switch became inactive, displaying the following error:

image

at the same time, the journal reported the following:

Jan 13 18:10:54 nubi gnome-shell[1020865]: Window manager warning: Trying to remove non-existent keybinding "show-hamster-dropdown".
Jan 13 18:10:54 nubi gnome-shell[1020865]: Shutting down hamster-shell-extension.
Jan 13 18:10:54 nubi gnome-shell[1020865]: JS ERROR: Extension contact@projecthamster.org: TypeError: this.panelWidget is null
                                           _removeWidget@file:///home/elav01/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:278:13
                                           disable@file:///home/elav01/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:191:14

I haven't found another way to make the widget visible apart from logging out of the gnome session and logging in again.

Originally posted by @lefterav in https://github.com/projecthamster/hamster-shell-extension/issues/362#issuecomment-1890598307

lefterav commented 10 months ago

Unfortunately, the messages appearing at the journal are not more explanatory. If anybody has any suggestion how to debug further, I would appreciate.

I also just received the following message, but Hamster applet is still running image

mwilck commented 10 months ago

This message means that hamster itself (the python application that provides the DBUs service) has quit or crashed. If that happens, the extension stops indeed. It's possible that there's a problem in the error handling code path in this case.

But the actual problem is that hamster has quit. The GNOME extension is not self-sufficient, it needs hamster running to work.

matthijskooijman commented 10 months ago

@lefterav What version of the extension are you using? Since https://github.com/projecthamster/hamster-shell-extension/pull/358 it should be more resilient against the hamster service quitting (and appear again when the service returns), but I'm not sure if you have those changes in your version already. If not, that could help. If so, maybe the commits in that PR can help you figure out the code for this and maybe add some additional log messages in appropriate places?

lefterav commented 10 months ago

I have the latest from origin/362-support-for-gnome-45 If this is wrong, please help. The entire versioning thing is very confusing

mwilck commented 10 months ago

That should be fine, it includes 75541ac ("Merge pull request #358 from matthijskooijman/handle-hamster-restarts").

lefterav commented 10 months ago

This happens several times a day, the back-end disappears, then the front-end gives this desktop notification 16 times. The applet disappears for one minute or so, and then it appears again.

image

the log for the case is as following

Jan 18 12:03:53 nubi nautilus[1510395]: Attempted to add a non-existent file to the view.
Jan 18 12:03:54 nubi thunderbird.desktop[1270181]: JavaScript error: chrome://conversations/content/stub.bundle.js, line 736: TypeError: iframe is undefined
Jan 18 12:04:01 nubi nautilus[1510395]: Attempted to add a non-existent file to the view.
Jan 18 12:04:26 nubi gnome-shell[1256685]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x56097b8da230] is on because it needs an allocation.
Jan 18 12:04:26 nubi gnome-shell[1256685]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x56097b9573b0] is on because it needs an allocation.
Jan 18 12:04:26 nubi gnome-shell[1256685]: Error in size change accounting.
Jan 18 12:05:46 nubi gnome-shell[1256685]: Shutting down hamster-shell-extension.
Jan 18 12:05:48 nubi gnome-shell[1256685]: Source ID 1546179 was not found when attempting to remove it
Jan 18 12:05:48 nubi gnome-shell[1256685]: Source ID 1546294 was not found when attempting to remove it
Jan 18 12:05:48 nubi gnome-shell[1256685]: [system-monitor-next] applet disable
Jan 18 12:05:50 nubi org.gnome.Hamster[1477038]: hamster-service up
Jan 18 12:05:50 nubi org.gnome.Hamster[1477038]: `/usr/libexec/hamster/hamster-service` has changed. Quitting!
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:51 nubi gnome-shell[1256685]: error: Hamster: DBUS proxy disappeared: Disabling extension until it comes back
Jan 18 12:05:52 nubi dbus-daemon[1254678]: [session uid=1000 pid=1254678] Activating service name='org.gnome.Hamster' requested by ':1.1260' (uid=1000 pid=1507605 comm="/usr/bin/python3 /usr/bin/hamster overview" label="unconfined")
Jan 18 12:05:52 nubi gnome-shell[1256685]: loading default theme (Adwaita)
Jan 18 12:05:52 nubi dbus-daemon[1254678]: [session uid=1000 pid=1254678] Successfully activated service 'org.gnome.Hamster'
Jan 18 12:05:53 nubi gnome-shell[1256685]: [system-monitor-next] applet enable from /home/elav01/.local/share/gnome-shell/extensions/system-monitor-next@paradoxxx.zero.gmail.com
Jan 18 12:05:53 nubi gnome-shell[1256685]: error reading: /sys/class/hwmon/hwmon5/fan1_input
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: JS ERROR: TypeError: this.panelWidget is null
Jan 18 12:05:53 nubi gnome-shell[1256685]: Launching DING process

I haven't yet had again the case that the applet doesn't appear again, which is what I described while opening that issue. But I am leaving this here, because it seems that things are connected.

mwilck commented 10 months ago

What version of hamster (the python code) are you running? I don't deny the GNOME extension doesn't behave perfectly, but the root cause is that hamster is dying. Maybe you should run it under strace or so to figure out what's going on.