-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]Gnome shell 42 not support #229
Comments
I get a similar error in the journal when I enable this extension. I'm using 4a6f0f2 with gnome-shell-42~rc-3.fc36 on Fedora 36.
|
Same error in Debian Sid |
Here too on my Gentoo |
Same error on Debian sid. Is this extension still in active development, because the developer didn't even react to any of the last issues and there seems to be no action since beginning of february? |
I've found the problem:
the code after the superclass constructor never gets executed, in this case the _init function (which is obviously important) Why? no idea edit: potentially related to gjs upgrade 1.72.0 that came with gnome 42. since 1.71.1 (prelease), they changed how constructor() functions and _init() functions work with GObject subclasses |
These are the API changes/upgrade tips: https://gjs.guide/extensions/upgrading/gnome-shell-42.html |
Yeah, I've been looking at that page all day yesterday. Seems incomplete to
say the least
…On Sun, Mar 27, 2022, 2:04 PM bhack ***@***.***> wrote:
These are the API changes/upgrade tips:
https://gjs.guide/extensions/upgrading/gnome-shell-42.html
—
Reply to this email directly, view it on GitHub
<#229 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVHKGHIT75KO3ZADGCBZDVCBME5ANCNFSM5RB4VDXQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
According to https://gjs.guide/guides/gobject/subclassing.html#subclassing-gobject, Javascript classes that subclass GObject must implement an _init() initializer instead of using a regular constructor. The ProfileMenuItem and SoundDeviceMenuItem each subclass PopupMenu classes that ultimately subclass a GObject class. This has just worked because the constructor itself was called, and it in turn was calling the correct _init methods. gjs commit 16032db6cd2 (Correctly chain constructor prototypes to enable static inheritance) made it so that constructors are called directly but the gjs behavior of calling _init still occurs. It occurs using this._init(), though so what has happened is as follows. SoundDeviceChooserBase._deviceAdded instantiates a SoundDeviceMenuItem with four arguments that are passed to the constructor. In turn, the superclass's constructor is called with two of those arguments. Due to the change in gjs, the original class's _init routine is called from the superclass's constructor but with only the two arguments passed to it. We end up with icon_name = null, which predictably blows up later. The same issue affects ProfileMenuItem since the superclass's constructor is only called with one argument instead of two. The fix is simple: Follow the guidelines in the gjs guide for subclassing GObject and just remove the constructors for both of those classes in favor of just using _init(). The _init() methods already do the right thing in calling the superclass's _init() method themselves. AFAICT, this change should be compatible back to very old gjs versions since that appears to be a long-standing guideline.
I've created PR #230 with the above commit. It fixes it for me. The explanation is in the commit message but the tl;dr is that this extension has had a bug that violated the guidelines for subclassing GObject but it was harmless until gjs 1.72.0. |
@jeffmahoney tested on nixos and confirmed working perfectly! |
Dear @jeffmahoney Thanks for your efforts! I saw that @justinkb confirmed that it is working. So I tested your reworked base.js file on my Debian Sid system with Gnome Shell 42 but it doesn't work. It still shows "Extension initialising ..." even though I have adopted the shell version in the metadata.json file and restarted. Do you have any idea what could be missing? In the gnome-control-center my system shows "Gnome shell 42.0". But if I check it via the command line it shows "Gnome shell 41.4". So it could also be a problem of my system. |
I was held up with work. I will push the changes soon. Thanks @jeffmahoney for the PR. I will merge and test the changes |
Properly fix for GNOME 42 / gjs 1.72.0 (#229).
@minax007 |
Ah right. In my nix package definition I've added that commit that enables
42 support too as a patch.
…On Tue, Mar 29, 2022, 1:46 PM palWorx ***@***.***> wrote:
@minax007 <https://github.com/minax007>
I am also on Debian sid and it worked for me even after F2+r instead of a
restart, so i guess you possibly have a problem in the metadata.json
change. Whats different to your setup is that i switched off the
compatibility check for extensions with dconf.
—
Reply to this email directly, view it on GitHub
<#229 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVHKDWQ4ETATRGSLB6LIDVCLURNANCNFSM5RB4VDXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Dear @palWorx thanks for the hint. I have activated in dconf-editor the parameter "“disable-extension-version-validation”. And have downloaded the latest build. And now it works! Thanks to all of of the contributors and supporters! |
You must not have applied the patch correctly to from wherever your system
is loading the addon
…On Tue, Mar 29, 2022, 2:24 PM minax007 ***@***.***> wrote:
Dear @palWorx <https://github.com/palWorx>
thanks for the hint.
I have activated in dconf-editor the parameter
"“disable-extension-version-validation” - but the result is the same.
It still shows "Extension initialising ...".
—
Reply to this email directly, view it on GitHub
<#229 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVHKCLYACJPPUPXDTLLMLVCLZBDANCNFSM5RB4VDXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I can confirm that I have no problems with Debian Sid. So I think that it is not related to this gnome shell extension. Potentially you have another extension which caused the problem when disabling the extenion version validation. |
@minax007 |
I just following the Installation Instructions and everything works like a charm. |
I can confirm the same. |
I've updated the Fedora package to include the necessary patches. If any Fedora 36 early adopters would like to test it will be available as gnome-shell-extension-sound-output-device-chooser-40^2.4a6f0f2-2.fc36, which is on it's way to the updates-testing repository. |
New version works great! @kgshank can you upload the new version to extensions.gnome.org? I can see that the version there is even older than previous fixes in this repo |
@carlwgeorge I can confirm that the RPM |
The new version is uploaded into extensions.gnome.org and should be available after review |
You might want to make a GitHub release for GNOME shell 42, so that downstream distros like Fedora or Debian can package it. https://github.com/kgshank/gse-sound-output-device-chooser/releases FYI gnome-shell 42 has reached Debian bookworm and gnome-shell-extension-sound-device-chooser has been removed. |
@kgshank Asking the same for Arch Linux (AUR). :) |
@pabs3 & @francoism90 I missed to make a release this time. New releases are available now. |
Hi Everyone, the latest git version has some changes for Gnome V3.32. Since it affects the changes made for v42, is it possible for some of you to test the git version in V40/V42 and let me know whether all works good. |
@kgshank Did you test at Gnome 3.32? |
@thesmallcreeper Yes I tested basic functionality to switch devices in Rocky Linux and @SonGokussj4 confirmed in #234 |
It works well from the last update. After PC restart, I've noticed a warning in
But, once again, it does appear to work without a problem for now :-) |
I tested f92fcbf on Fedora 36 Beta with GNOME Shell 42.0. As far as I can tell it works. |
@SonGokussj4 There are updates for the message you got,please check |
In case anyone has the same problem: After updating to Fedora 36 for whatever reason gnome extensions were disabled all together. Opening the Extensions application and switching the toggle in the top bar did the trick. |
Fedora 36 with Gnome-shell 42
Extension can't be installed and enabled.
See log:
JS ERROR: Extension [email protected]: Error: Wrong type undefined; string expected
setIcon@resource:///org/gnome/shell/ui/popupMenu.js:479:13
_init@resource:///org/gnome/shell/ui/popupMenu.js:471:14
_init@/home/plum/.local/share/gnome-shell/extensions/[email protected]/base.js:98:19
PopupBaseMenuItem@resource:///org/gnome/shell/ui/popupMenu.js:73:4
PopupImageMenuItem@resource:///org/gnome/shell/ui/popupMenu.js:454:1
SoundDeviceMenuItem@/home/plum/.local/share/gnome-shell/extensions/[email protected]/base.js:92:9
_deviceAdded@/home/plum/.local/share/gnome-shell/extensions/[email protected]/base.js:325:19
_onControlStateChanged@/home/plum/.local/share/gnome-shell/extensions/[email protected]/base.js:280:22
SoundDeviceChooserBase@/home/plum/.local/share/gnome-shell/extensions/[email protected]/base.js:231:18
SoundOutputDeviceChooser@/home/plum/.local/share/gnome-shell/extensions/[email protected]/extension.js:33:9
enable@/home/plum/.local/share/gnome-shell/extensions/[email protected]/extension.js:155:36
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:181:32
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:363:26
_onInstallButtonPressed@resource:///org/gnome/shell/ui/extensionDownloader.js:267:35
Async*addButton/<@resource:///org/gnome/shell/ui/dialog.js:132:41
The text was updated successfully, but these errors were encountered: