eonpatapon / gnome-shell-extension-caffeine

Disable screensaver and auto suspend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RHEL 9.1 error

srosciszewski opened this issue · comments

Technical details:

SyntaxError: expected property name, got '{'

Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:216:33
OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:128:33
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
start@resource:///org/gnome/gjs/modules/script/package.js:190:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

Hello, how did you get this ? When using the Caffeine preferences ?

I can confirm the issue: the extension work as expected, but we get this error when opening preferences. RHEL 9.1 use gnome 40.4 and Caffeine v42.

The problem come from this commit. it seems like the ShortcutSettingWidget cause this error. I can't really find the root of the problem for the moment. Also, I reckon that using Adw in gnome 40 would generate another crash: Error: Requiring Adw, version none: Typelib file for namespace 'Adw' (any version) not found.

So maybe the best thing to do is simply removing this feature for gnome 40. So, create a specific fixed branch for gnome 40 and keep the current v42 for gnome 41/42. What do you think @eonpatapon ?

Hi @srosciszewski

I fixed this issue and I tested it successfully in RHEL 9.1 / gnome 40. Could you please confirm that it work for you ?

Remove your current version of Caffeine, then:

git clone --branch gnome-shell-40 https://github.com/pakaoraki/gnome-shell-extension-caffeine.git
cd gnome-shell-extension-caffeine
make build
make install

After logout, preferences should be accessible again.

I'm inclined to close this for the same reasons as #256, unless @pakaoraki plans to merge a fix into the GNOME 40 branch. However, that won't make it to a full release, and users would have to be directed to that branch, but at least a fix would be available for users running old versions of GNOME.

I guess there is not much people using Caffeine with Gnome 40, this fix was working for me but I don't have any feedback from users. Maybe we can still create a dedicated branch for gnome 40 with this fix in case some people want to use it ?

There is a branch for GNOME 40 -> 42, under gnome-shell-40-42. I don't know what @eonpatapon's policy for updating older releases is, but perhaps your fix could be tested and merged into that branch, allowing this issue to be closed?

@stuarthayhurst there's no policy, but it's surely possible to backport a patch in this branch.

The problem is how to publish this new version. Ideally we could do something like 34.1 (say the latest gnome 40/42 version was 34) but I'm not sure e.g.o supports this.

I suppose you could release a version with only GNOME 40-42 as the supported versions, with version 49. This should give an update to all GNOME 40-42 users, without affecting the GNOME 43/44 users. Then regular releases would resume from version 50.

I don't know if e.g.o would allow this, so we could always put a note in the README of master, explaining the issue and how to fix it, if e.g.o doesn't like that

I suppose you could release a version with only GNOME 40-42 as the supported versions, with version 49.

The change is just for Gnome 40: it remove completely the keyboard shortcut option that crash the settings menu (it was introduce for Gnome 41 I think). I'm not sure it is worthy to remove it for Gnome 41-42 as it is working fine.

I'm not familiar with Gnome official extension portal, and if it's possible to publish different version/branch for targeting different version of Gnome.
If it's tricky to update only the version for Gnome 40, we can maybe just create a specific gnome 40 branch for people to install manually with a quick note/explanation on Github page for people having this issue.

This way the current gnome-shell-40-42 branch become gnome-shell-41-42 , and we create a new branch gnome-shell-40 for this fix.

Is it possible to disable the keyboard shortcut for just GNOME 40? That way the branch won't need to be modified.

Theoretically, you can publish an update that only lists GNOME 40 / 41 / 42, and the update will only reach those systems and leave GNOME 43 / 44 on the real latest version, but I haven't actually attempted that. I'll ask on GNOME's Matrix chatroom for extensions if they have any ideas.

Stuart

So I'm helping out with Caffeine, and we've got some reports the settings are broken on GNOME 40 from users with LTS distros. As the latest version doesn't support GNOME 40 anymore, can we push a new version that supports just GNOME 40 in the metadata with a fix, and resume normal releases for GNOME 43+ after that?

Just Perfection

yes, multi versioning is supported on ego.
you can also inactivate the faulty version.

So that's an option then. I'm not sure inactivating the faulty version would work, as it would depend on when the issue was introduced, and when support was added for the other versions.

I don't think it's necessary to deactivate the old version, as new install will use the latest one and probably existing installs will be prompted to update.

So if you have a patch, just push it to the branch and I'll upload a new version in e.g.o

With GNOME 45 coming up, I don't think it's worth maintaining the extension for ancient versions of GNOME.

I'm happy to close this, unless someone really wants to get this fix pushed through to a release.

Is it possible to disable the keyboard shortcut for just GNOME 40? That way the branch won't need to be modified.

For some reason, I didn't manage to make a unique version that can be use in Gnome 40 and Gnome 41/42. To make it work, the only solution I have is to publish a specific release for Gnome 40 without the incompatible lines of code.

I created a gnome-shell-40 branch from : gnome-shell-40. I agree that it's not worthy to maintain old Gnome version, but this way people having this issue can manually install the fix from this archived branch.

Fixed in #293