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
332 stars 26 forks source link

Preferences page crashes on Ubuntu 24.04 #135

Open ashwinikd opened 1 month ago

ashwinikd commented 1 month ago

Preference window crashes on clicking preferences icon from both top bar and extension manager list. The error is pasted below:

The settings of extension tophat@fflewddur.github.io had an error:

SyntaxError: import declarations may only appear at top level of a module @ resource:///org/gnome/Shell/Extensions/js/misc/extensionUtils.js:4:0

Stack trace:
  @file:///home/ashwini/.local/share/gnome-shell/extensions/tophat@fflewddur.github.io/prefs.js:24:24
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Screenshot of the window: image

System information:

dennisameling commented 1 month ago

I ran into the same issue on Ubuntu 24.04. Showing the Technical Details revealed some more details:

Error: Requiring Clutter, version none: Typelib file for namespace 'Clutter' (any version) not found

Stack trace:
  require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
  @gi://Clutter/:3:25
  _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

So I ran this to install Clutter:

sudo apt install gir1.2-clutter-1.0

Then did a system restart, and the preferences page now works correctly 🎉

ashwinikd commented 1 month ago

Thanks. Installing clutter resolves the issue. Is this included somewhere in the docs? This was working correctly on 23.04 and did not work out of the box on 24.04.

BTW, did not require a system restart for me. Worked as soon as clutter was installed.

SylChamber commented 1 month ago

Same here, no restart necessary. Ubuntu 24.04.