fflewddur / tophat

View CPU, memory, disk, and network activity in the GNOME top bar.
https://extensions.gnome.org/extension/5219/tophat/
GNU General Public License v3.0
347 stars 26 forks source link

Button changes to error when I reinstall from Gnome Extensions website #72

Closed arunkd13 closed 1 year ago

arunkd13 commented 1 year ago

I had a previous version op TopHat and I was prompted for an upgrade today. So I went to the Gnome Extensions page which did not provide an option for an upgrade. So I clicked on remove extension and then I installed it again.

Now the button turned to ERROR without any clue of what happened. I tried removing once again and installing it, but ended up in the same situation.

I am on Debian GNU/Linux 11 (bullseye)

arunkd13 commented 1 year ago

journalctl -f -o cat /usr/bin/gnome-shell gives the following output

JS ERROR: Extension tophat@fflewddur.github.io: Error: A different version was loaded previously. You need to log out for changes to take effect.
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:342:52
callback@resource:///org/gnome/shell/ui/extensionDownloader.js:222:39
gotExtensionZipFile/<@resource:///org/gnome/shell/ui/extensionDownloader.js:106:13
arunkd13 commented 1 year ago

Based on the above log message, I logged out and logged in again and the extension was running fine.

arunkd13 commented 1 year ago

Is there any way to prompt the user to log out and log in again?

It wasn't easy for me to figure out the problem and how to solve it, until I looked in the logs which I don't expect most users to do.

fflewddur commented 1 year ago

Thanks for the report! I think you're describing GNOME's built-in extension update checking. TopHat doesn't do any update checks or notifications itself, so this is likely out of my control. Because of how GNOME Shell works, the only way for updated extension code to be reloaded is by restarting the GNOME Shell process, which is why logging out fixed it.

The standard GNOME notification should explain that all updates from extension.gnome.org are managed automatically, and will take effect when you log out and log back in. If you're experiencing something different, I think your best bet is to file an issue on the extension update system itself at https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues.