paradoxxxzero / gnome-shell-system-monitor-applet

Display system informations in gnome shell status bar, such as memory usage, cpu usage, network rates…
GNU General Public License v3.0
1.75k stars 324 forks source link

Error: Tried to construct an object without a GType #713

Closed dbear496 closed 3 years ago

dbear496 commented 3 years ago

I recently updated system-monitor-next via Firefox, and now the extension won't start. When I look in the Extensions app, it says Error: Tried to construct an object without a GType. I tried reinstalling the extension and rebooting, but it still does not start.

Info: system-monitor-next: 36 GNOME: 40.2.0 OS: Ubuntu 21.10

philb61 commented 3 years ago

This seems to be a weird Wayland thing. I was getting the same thing. Logged in using Gnome instead, installed it, then switched back to Wayland, and all seems fine. Very odd.

dbear496 commented 3 years ago

This seems to be a weird Wayland thing. I was getting the same thing. Logged in using Gnome instead, installed it, then switched back to Wayland, and all seems fine. Very odd.

Unfortunately, this does not work for me. (I assume you meant 'XOrg, not GNOME'.)

philb61 commented 3 years ago

You are correct, I did indeed mean X.org.

Odd, I'll have to try on my other machines, but it's running on one of my Wayland machines right now, although they are all still on Ubuntu 21.04.

garak commented 3 years ago

I have the same error on Gnome 40.4.0 with X

philb61 commented 3 years ago

Yeah, checking on another machine, my "solution" fails miserably. I'm trying to remember what else I did to the one that works, and I now recall I installed from this git repo, then uninstalled before doing the other thing. I'll do that next.

philb61 commented 3 years ago

Right, that did the trick...

So make install from the code, which compiles and installs it in the local user directory...But doesn't seem to show it anywhere you can use it. Then make remove to delete that version, and you can install it from the gnome-extension site correctly.

dbear496 commented 3 years ago

Right, that did the trick...

So make install from the code, which compiles and installs it in the local user directory...But doesn't seem to show it anywhere you can use it. Then make remove to delete that version, and you can install it from the gnome-extension site correctly.

Unfortunately, this does not work for me either. Installing from the gnome-extension site still gives an error. I tried both system-monitor and system-monitor-next.

philb61 commented 3 years ago

Yeah, I couldn't easily replicate it on my other machines, so I just ended up installing the extension from this repo instead.

Tommimon commented 3 years ago

I got the same error and I solved it by installing the extension with:

sudo apt install gnome-shell-extension-system-monitor

Then I restarted the gnome-shell.

Hope this can help you.

chrisspen commented 3 years ago

This is a duplicate of issue #707.

mynam3isg00d commented 3 years ago

I got the same error and I solved it by installing the extension with:

sudo apt install gnome-shell-extension-system-monitor

Then I restarted the gnome-shell.

Hope this can help you.

Very cool thanks

dbear496 commented 3 years ago

I got the same error and I solved it by installing the extension with:

sudo apt install gnome-shell-extension-system-monitor

Then I restarted the gnome-shell.

Hope this can help you.

This worked for me. Odd I thought I had already tried this before. But now it works so I'm happy :slightly_smiling_face: .

ruffson commented 2 years ago

I got the same error and I solved it by installing the extension with:

sudo apt install gnome-shell-extension-system-monitor

Then I restarted the gnome-shell.

Hope this can help you.

For what it's worth, this also helped on Fedora 35 where this is also a problem (on either X11 or Wayland). Package name is slightly different though:

sudo dnf install gnome-shell-extension-system-monitor-applet
sideeffffect commented 2 years ago

According to https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/707#issuecomment-1022043919 installing libgtop2-dev solves this issue. (You may need to restart, but the system-monitor will work eventually.)

mbana commented 2 years ago

According to #707 (comment) installing libgtop2-dev solves this issue. (You may need to restart, but the system-monitor will work eventually.)

Same here.

On Ubuntu 22.04.1 under Wayland installing libgtop2-dev did the trick:

sudo apt-get install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 gnome-system-monitor gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 gnome-system-monitor gir1.2-gtop-2.0 gir1.2-nm-1.0 gnome-system-monitor libgtop2-dev
progfou commented 2 years ago

Hi there!

On Ubuntu 22.10, installing the runtime library package (not the development one) was enough to solve this problem for me:

sudo apt install gir1.2-gtop-2.0

After doing this, you need to restart GNOME Shell to reload the extensions, either by using Alt+F2 r Enter or by restarting the session.

Note that I'm running Xorg at the moment and also had this same problem, so it's probably not related to Wayland but to missing dependencies instead. BTW, the required dependencies are actually specified in the README file!

Last but not least, it appears there is a test for missing dependencies in the extension.js file, but it wasn't displayed. All I got was this Tried to construct an object without a GType error message in the extension manager.