Bug 2184351 - Regression / Update breaks ext in RHEL8 / TypeError: GObject.registerClass() used with invalid base class
Summary: Regression / Update breaks ext in RHEL8 / TypeError: GObject.registerClass() ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: gnome-shell-extension-system-monitor-applet
Version: epel8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: nicolas.vieville
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-04 11:26 UTC by Leon Fauster
Modified: 2023-04-29 05:17 UTC (History)
2 users (show)

Fixed In Version: gnome-shell-extension-system-monitor-applet-38-23.20230420git21d7b4e.fc39 gnome-shell-extension-system-monitor-applet-38-23.20230420git21d7b4e.fc38 gnome-shell-extension-system-monitor-applet-38-23.20230420git21d7b4e.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-20 14:37:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Leon Fauster 2023-04-04 11:26:14 UTC
Description of problem:
Current update of gnome-shell-extension-system-monitor-applet

38-18.20220527gitb359d88.el8 

to

38-22.20230326git21d7b4e.el8

breaks extension loading in RHEL8 / Gnome session.

Looking glasses of gnome shows following error:

TypeError: GObject.registerClass() used with invalid base class (is ModalDialog)

Actual result: 
No system-monitor-applet in UI

Expected result:
system-monitor-applet loaded an working



Additional info:
Repos do not provide a downgrade path.

Comment 1 nicolas.vieville 2023-04-06 14:22:29 UTC
Hello,

Thank you very much for reporting this issue.

I'll try to fix it in the next few days.

But for the moment you can downgrade to the previous version 
by getting the appropriate rpm file here: 

https://kojipkgs.fedoraproject.org/packages/gnome-shell-extension-system-monitor-applet/38/18.20220527gitb359d88.el8/noarch/gnome-shell-extension-system-monitor-applet-38-18.20220527gitb359d88.el8.noarch.rpm

Or you can directly type in a root console this command:

dnf install copy_the_above_URL

This will install the previous version for el8.

I wonder if you wouldn't mind if I provide you, in the next few days,
a file of the new version of this package, with I hope, a fix
for this issue, and if you could give it a try, and provide some
feedback in this bug report. As I don't use RHEL8, and don't have one
installed, it would be great if could proceed to the test of the fix.

Feel free to make any comment about these subjects.

Cordially,


-- 
NVieville

Comment 2 Leon Fauster 2023-04-06 15:10:01 UTC
(In reply to nicolas.vieville from comment #1)
> 
> Thank you very much for reporting this issue.
> 
> I'll try to fix it in the next few days.
> 

Great, thanks for taking care.



> But for the moment you can downgrade to the previous version 
> by getting the appropriate rpm file here: 
> 
> https://kojipkgs.fedoraproject.org/packages/gnome-shell-extension-system-
> monitor-applet/38/18.20220527gitb359d88.el8/noarch/gnome-shell-extension-
> system-monitor-applet-38-18.20220527gitb359d88.el8.noarch.rpm
> 
> Or you can directly type in a root console this command:
> 
> dnf install copy_the_above_URL
> 
> This will install the previous version for el8.


Thanks for the koji pointer. The problem with koji packages is that 
they are not signed, but in the meantime I was lucky to found one on
a mirror repo that was not yet in sync.


> 
> I wonder if you wouldn't mind if I provide you, in the next few days,
> a file of the new version of this package, with I hope, a fix
> for this issue, and if you could give it a try, and provide some
> feedback in this bug report. As I don't use RHEL8, and don't have one
> installed, it would be great if could proceed to the test of the fix.

Sure, am happy to help.

Comment 3 nicolas.vieville 2023-04-08 10:54:09 UTC
Hello,

(In reply to Leon Fauster from comment #2)
> > I wonder if you wouldn't mind if I provide you, in the next few days,
> > a file of the new version of this package, with I hope, a fix
> > for this issue, and if you could give it a try, and provide some
> > feedback in this bug report. As I don't use RHEL8, and don't have one
> > installed, it would be great if could proceed to the test of the fix.
> 
> Sure, am happy to help.

Thank you very much.

Here is a link to an attempt fix for the package of the 
gnome-shell-extension-system-monitor-applet for RHEL 8:

https://www.dropbox.com/s/y4kfk6tt241rl72/gnome-shell-extension-system-monitor-applet-38-23.20230408git21d7b4e.el8.noarch.rpm?dl=1

Once this RPM package downloaded, you can upgrade your current package 
with a command like this:

dnf upgrade Path_to_your_downloaded_file/gnome-shell-extension-system-monitor-applet-38-23.20230408git21d7b4e.el8.noarch.rpm

Before proceeding, keep a copy of your previous installed package, 
in case this new one doesn't work. So, you could revert to the previous 
working package using the same dnf command but with the old RPM file 
name.

Note: as the new package with a fix is self-built, it isn't signed and 
you probably should add the appropriate options to dnf command in order 
to install it.

Any feedback about this attempt to fix this issue would be very 
appreciated.

In case this attempt works, I'll push it to the official repositories, 
as soon as possible.

Thank you again for your feedback.

Cordially,


-- 
NVieville

Comment 4 Leon Fauster 2023-04-15 16:33:17 UTC
Hi, I found some time to test now. 

Unfortunately it did not work at first but a closer look into the new implemented condition shows:
  if (shell_Version > '3.32')

I tested a change to 3.33 and it worked then on RHEL8. RHEL8 has 

# rpm -q gnome-desktop3
gnome-desktop3-3.32.2-1.el8.x86_64

# cat /usr/share/gnome/gnome-version.xml 
<?xml version="1.0"?>
<gnome-version>
 <platform>3</platform>
 <minor>32</minor>
 <micro>2</micro>
 <distributor>GNOME.Org</distributor>
 <date>2021-04-12</date>

and RHEL9 has something around version 40...

So, I think 3.33 in the if statement is save.

The sum up - it works with the following addition:

--- a/usr/share/gnome-shell/extensions/system-monitor.gmail.com/extension.js	2023-04-15 17:03:03.591599654 +0200
+++ b/usr/share/gnome-shell/extensions/system-monitor.gmail.com/extension.js	2023-04-15 18:29:04.983922335 +0200
@@ -284,7 +284,7 @@
 }
 
 // Add compatibility with Gnome-Shell <= 3.32 - RHEL 8
-if (shell_Version > '3.32') {
+if (shell_Version > '3.33') {
     const smDialog = GObject.registerClass(
         class SystemMonitor_smDialog extends ModalDialog.ModalDialog {
             constructor() {


Thanks!

Comment 5 nicolas.vieville 2023-04-16 10:56:25 UTC
Hello,

(In reply to Leon Fauster from comment #4)
> Hi, I found some time to test now. 

Thank you very much for your time and your feedback.


> Unfortunately it did not work at first but a closer look into the new
> implemented condition shows:
>   if (shell_Version > '3.32')
> 
> I tested a change to 3.33 and it worked [...] 

In order to be as close as possible to the intention of the test of 
gnome-shell version, I wonder if you could please give a try to a modified
code:

-if (shell_Version > '3.32') {
+if (shell_Version >= '3.33') {
      const smDialog = GObject.registerClass(
          class SystemMonitor_smDialog extends ModalDialog.ModalDialog {
              constructor() {

This would lead to version from 3.33 and superior use this part of the code
including 3.33.0 too.

Maybe, it should be possible to replace 3.33 by 3.34 as it seems that minor 
version odd number are dedicated to development version of gnome-shell, and
even number to official release version and GNU/Linux distributions usually
use official ones.

Thanks again for your feedback.

Feel free to make any comment about these subjects.

Cordially,


-- 
NVieville

Comment 6 Leon Fauster 2023-04-16 12:06:47 UTC
(In reply to nicolas.vieville from comment #5)
> 
> In order to be as close as possible to the intention of the test of 
> gnome-shell version, I wonder if you could please give a try to a modified
> code:
> 
> -if (shell_Version > '3.32') {
> +if (shell_Version >= '3.33') {
>       const smDialog = GObject.registerClass(
>           class SystemMonitor_smDialog extends ModalDialog.ModalDialog {
>               constructor() {
> 
> This would lead to version from 3.33 and superior use this part of the code
> including 3.33.0 too.
> 
> Maybe, it should be possible to replace 3.33 by 3.34 as it seems that minor 
> version odd number are dedicated to development version of gnome-shell, and
> even number to official release version and GNU/Linux distributions usually
> use official ones.
> 

shell_Version >= '3.33' and shell_Version >= '3.34' both do work here (RHEL8)


I don't known when it starts that wrapping it with  GObject.registerClass was supported. 
Maybe even higher then 3.34. If the patch is only for RHEL/Fedora then its not 
relevant anyway (everything on versions > 4x.y ).

Comment 7 nicolas.vieville 2023-04-16 13:27:30 UTC
Hello,

(In reply to Leon Fauster from comment #6)
> shell_Version >= '3.33' and shell_Version >= '3.34' both do work here (RHEL8)

Thank you very much for the tests and the feedback.

> I don't known when it starts that wrapping it with  GObject.registerClass
> was supported. 
> Maybe even higher then 3.34. If the patch is only for RHEL/Fedora then its
> not relevant anyway (everything on versions > 4x.y ).

I didn't dig it deeply in the gnome-shell gitlab source code, but there 
seems that 4 years ago the switch to GObject.registerClass for ModalDialog
was done. This corresponds with Gnome-Shell 3.34.x. That's what is suggested
in this conversation:

https://www.reddit.com/r/gnome/comments/dgqp5v/comment/f3fdpi3/?utm_source=share&utm_medium=web3x

So, I'll make a patch for <3.34 compatibility on the base of the tests you made, 
update the gnome-shell-extensions-system-monitor-applet package for RHEL/Fedora,
and report this upstream with a proposed pull request with the patch.

Thank you very much for helping to catch this issue.

I let this bug report open until the issue is resolved (package pushed to 
repository).

Cordially,


-- 
NVieville

Comment 8 nicolas.vieville 2023-04-17 13:53:36 UTC
Hello,

@Leon Fauster, I wonder if you could please give a try to the 
new package available here:

https://www.dropbox.com/s/5jjdux6eqbfa58v/gnome-shell-extension-system-monitor-applet-38-23.20230416git21d7b4e.el8.noarch.rpm?dl=1

This new package implements a new patch to workaround this issue
and was suggested upstream in order to avoid duplicating code
in the extension. But as I don't own any machine with RHEL 8,
I can't test it.

If you can test it, any feedback would be very appreciated.

Cordially,


-- 
NVieville

Comment 9 Leon Fauster 2023-04-17 18:11:52 UTC
(In reply to nicolas.vieville from comment #8)
> 
> This new package implements a new patch to workaround this issue
> and was suggested upstream in order to avoid duplicating code
> in the extension. But as I don't own any machine with RHEL 8,
> I can't test it.

Yep, the ternary way works also! Thanks.

Comment 10 nicolas.vieville 2023-04-18 06:59:54 UTC
(In reply to Leon Fauster from comment #9)
> Yep, the ternary way works also! Thanks.

Thank you so much for your valuable feedback.
The upstream proposal was modified to the ternary way, for the record here:

https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/pull/790

Cordially,


-- 
NVieville

Comment 11 nicolas.vieville 2023-04-18 11:02:37 UTC
Hello,

Sorry for that. New package, with new method (not ternary way) to
workaround this issue is available through the same Dropbox URL as 
message #8.

If you have time to give it a try, as usual, a little bit of feedback 
would be really appreciated. For the record, this new version works 
with Fedora 37 and gnome-shell 43.4.

Cordially,


-- 
NVieville

Comment 12 Leon Fauster 2023-04-19 19:33:22 UTC
(In reply to nicolas.vieville from comment #11)
> Hello,
> 
> Sorry for that. New package, with new method (not ternary way) to
> workaround this issue is available through the same Dropbox URL as 
> message #8.
> 

The ext does not produce any errors and do show up in the UI. So, the new variant works! Thanks.

Comment 13 nicolas.vieville 2023-04-20 11:46:14 UTC
(In reply to Leon Fauster from comment #12)
> The ext does not produce any errors and do show up in the UI. So, the new
> variant works! Thanks.

Thank you very much for your feedback.

Cordially,


-- 
NVieville

Comment 14 Fedora Update System 2023-04-20 14:36:07 UTC
FEDORA-2023-12c384a9ff has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-12c384a9ff

Comment 15 Fedora Update System 2023-04-20 14:37:06 UTC
FEDORA-2023-12c384a9ff has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2023-04-20 14:54:03 UTC
FEDORA-2023-c45990ae68 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c45990ae68

Comment 17 Fedora Update System 2023-04-20 15:37:30 UTC
FEDORA-2023-367ee828b0 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-367ee828b0

Comment 18 Fedora Update System 2023-04-20 16:14:23 UTC
FEDORA-2023-96c18447c7 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-96c18447c7

Comment 19 Fedora Update System 2023-04-20 16:23:27 UTC
FEDORA-EPEL-2023-761b2f3f1d has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-761b2f3f1d

Comment 20 Fedora Update System 2023-04-20 16:36:06 UTC
FEDORA-EPEL-2023-0925a27b2d has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-0925a27b2d

Comment 21 Fedora Update System 2023-04-20 16:47:28 UTC
FEDORA-EPEL-2023-e38d252d89 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-e38d252d89

Comment 22 Fedora Update System 2023-04-21 02:21:34 UTC
FEDORA-EPEL-2023-e38d252d89 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-e38d252d89

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2023-04-21 02:30:44 UTC
FEDORA-EPEL-2023-0925a27b2d has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-0925a27b2d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2023-04-21 03:20:46 UTC
FEDORA-2023-c45990ae68 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c45990ae68`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c45990ae68

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2023-04-21 03:38:36 UTC
FEDORA-2023-96c18447c7 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-96c18447c7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-96c18447c7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 26 Fedora Update System 2023-04-21 03:44:34 UTC
FEDORA-EPEL-2023-761b2f3f1d has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-761b2f3f1d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 27 Fedora Update System 2023-04-21 03:52:58 UTC
FEDORA-2023-367ee828b0 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-367ee828b0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-367ee828b0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 28 Fedora Update System 2023-04-28 02:35:55 UTC
FEDORA-2023-c45990ae68 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 29 Fedora Update System 2023-04-29 03:47:16 UTC
FEDORA-EPEL-2023-e38d252d89 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 30 Fedora Update System 2023-04-29 03:48:34 UTC
FEDORA-EPEL-2023-0925a27b2d has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 31 Fedora Update System 2023-04-29 04:42:03 UTC
FEDORA-2023-367ee828b0 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 32 Fedora Update System 2023-04-29 05:12:09 UTC
FEDORA-2023-96c18447c7 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 33 Fedora Update System 2023-04-29 05:17:08 UTC
FEDORA-EPEL-2023-761b2f3f1d has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.