Skip to content

Error: GSettings schema com.github.wwmm.easyeffects not found #11

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Closed
Hyphaed opened this issue May 1, 2023 · 17 comments
Closed

Error: GSettings schema com.github.wwmm.easyeffects not found #11

Hyphaed opened this issue May 1, 2023 · 17 comments

Comments

@Hyphaed
Copy link

Hyphaed commented May 1, 2023

I got an error telling

Error: GSettings schema com.github.wwmm.easyeffects not found

when I click on easyeffects tray icon / presets selector

@ulville
Copy link
Owner

ulville commented May 1, 2023

Do you have Flatpak version of Easy Effects or have you installed it from your distro's repo? Which distro do you use?
Can you change presets from inside the Easy Effects app?
Also make sure that Easy Effects is running in the background after you close the window. There should be an option for that in the Easy Effects' settings menu.

@ulville
Copy link
Owner

ulville commented May 1, 2023

This generally happens only on a fresh install of Easy Effects and a simple reboot usually fixes those kind of problems.

Also make sure to;

  • Run Easy Effects at least once before using the extension,
  • Enable "run at startup" option in the Easy Effects' settings
  • Disable "Exit when window is closed" option in the Easy Effects' settings
  • Create or install some presets,

@4JX
Copy link

4JX commented May 20, 2023

Can reproduce by enabling/disabling the extension. Using the distro provided easyeffects app.

  • Extension version: 15
  • EasyEffects version: 7.0.3
  • GNOME Version: 43.2
  • Distro: NixOS 22.11 (6.1.27)

The path does exist and I've tried rebooting. I can freely change presets within the app and it is constantly running in the background.
Screenshot from 2023-05-20 19-12-49

@ulville
Copy link
Owner

ulville commented May 20, 2023

@4JX
Hmm interesting... I'll need more feedback to understand what's wrong.

Can you get your last used preset name by running;

gsettings get com.github.wwmm.easyeffects last-used-output-preset

or

gsettings get com.github.wwmm.easyeffects last-used-input-preset

on the terminal?

@4JX
Copy link

4JX commented May 20, 2023

It would seem I cannot

» gsettings get com.github.wwmm.easyeffects last-used-output-preset
No such schema ?com.github.wwmm.easyeffects?

After some more digging I suspect it could very well be a NixOS issue for my case going by NixOS/nixpkgs#92265 (comment) & NixOS/nixpkgs#92265 (comment) (which would you look at that, references this exact extension).

@ulville
Copy link
Owner

ulville commented May 20, 2023

Oh right, NixOS has to patch GNOME extensions for their environment and they expect you to install those patched versions via nix package manager. I have looked at it and they provide this extension in nix package manager but only up to version 12.

Hmm... Ideally they should fix it or patch it on their side and provide an up-to-date version or I would suggest you to use another more streamlined distro 😄 But I have a couple of things in my mind which I wanna try that may also make it work on NixOS. But I'll need your help. Or at worst I can provide a crippled version which still let you select the preset you want but doesn't indicate the last selected one.

I'll create a new branch and give the link of it here so you can try it on your machine to see if it will work. It's late in here and I must sleep soon so I don't know if I can manage to make it tonight and I'm busy for the whole day tomorrow but I'll try to give the first test versions in the Monday evening (GMT+03:00).

@4JX
Copy link

4JX commented May 22, 2023

Fixed it by patching the file and then doing some nix trickery to resolve @easyeffects_gsettings_path@. Went in pretty blind since I've got no dev-env setup for gnome extensions but it does the job. Will see about submitting a PR to nixpkgs to fix it for everyone, though I'd like to know if this feels "correct" (got no previous experience developing extensions).

--- a/extension.js
+++ b/extension.js
@@ -339,9 +339,9 @@ const EEPSIndicator = GObject.registerClass(
                     _lastUsedInputPreset = _idata.trim().slice(1, -1);
                 } else if (appType === 'native') {
                     // Get last used presets
-                    const settings = new Gio.Settings({
-                        schema_id: 'com.github.wwmm.easyeffects',
-                    });
+                    const _schema_source = Gio.SettingsSchemaSource.new_from_directory('@easyeffects_gsettings_path@', Gio.SettingsSchemaSource.get_default(), true);
+                    const _schema = _schema_source.lookup('com.github.wwmm.easyeffects', false);
+                    const settings = new Gio.Settings({settings_schema: _schema});
                     _lastUsedOutputPreset = settings.get_string(
                         'last-used-output-preset'
                     );

Screenshot from 2023-05-22 20-21-16

@Hyphaed
Copy link
Author

Hyphaed commented May 22, 2023

error solved

with Easy Effects app by Wellington Wallace

load a preset

after it extensions works properly

@Hyphaed Hyphaed closed this as completed May 22, 2023
@ulville
Copy link
Owner

ulville commented May 22, 2023

@4JX Feels about right to me 👍 I was trying to do something similar but stuck at getting the schema source directory programmatically using GJS. I don't have any experience/knowledge regarding to nix way of doing things but if you can automatically resolve @easyeffects_gsettings_path@ and it's a legit way in nix, it's fine on my perspective.

Will you also submit an auto-patch mechanism for the code which needs to be changed? My only concern is its sustainability for the future releases. Because code will have to be patched for every new release.

Maybe another weak spot; Because (even though I don't plan to do in the close future, but) someday that code may change, either by me or as a necessity caused by a change in the GNOME API. And that can break the patch. It'll need to be maintained.

For the sake of not breaking the patch in the future and making it easier for the maintainers I could do the patch in the upstream as another else if branch by detecting it's running in NixOS and branching to your patched code. But I don't really want to undertake the responsibility of maintaining it for another single distro I'm not even familier with. Also to detect the os_name I could use GLib.get_os_info but I'm not sure if it' goin to work on NixOS or is it goint yo bring new problems to the table. Whatever... it's a problem for the future ulville I guess.

P.S.

Also publishing the extension in the EGO with an undefined variable a.k.a @easyeffects_gsettings_path@ could result it being rejected in the review process.

@ulville ulville reopened this May 22, 2023
@Hyphaed
Copy link
Author

Hyphaed commented May 22, 2023

Can you change presets from inside the Easy Effects app?

I'm on Ubuntu 23.04, EasyEffects installed from .deb

@Hyphaed
Copy link
Author

Hyphaed commented May 22, 2023

This generally happens only on a fresh install of Easy Effects and a simple reboot usually fixes those kind of problems.

Also make sure to;

* Run Easy Effects at least once before using the extension,

* Enable "run at startup" option in the Easy Effects' settings

* Disable "Exit when window is closed" option in the Easy Effects' settings

* Create or install some presets,

for me the solution was doing that plus loading a preset

Open n close the EasyEffects app didn't solve the problem

I guess the GSettings schema was not created before load the preset. Couldn't tell since I didn't check if it was there

@4JX
Copy link

4JX commented May 22, 2023

@ulville The patch is for nixpkgs/NixOS to use (4JX/nixpkgs@747c6b0), not something that needs to be mantained on your side. Was just asking if that way of getting the schemas seemed fine as I mostly just yanked it from elsewhere since I don't have experience with GNOME extensions.

@ulville
Copy link
Owner

ulville commented May 22, 2023

@Hyphaed
I have assumed yours was the same problem as @4JX 's but appearently not. As I said it happens on fresh installs of EasyEffects or when you don't used any presets before. It's something I can't control with this extension. But I'll write a more detailed instruction list in the README for this kind of situations 👍

@ulville
Copy link
Owner

ulville commented May 22, 2023

@4JX Yes it's not the most popular way of getting the schemas but for this situation it looks completely fine to my eyes. Thanks for the work 👍 I'll keep this open for now (until your fix gets merged) for other folks using NixOS having the same problem. You can notify me here when it's fixed for all so I can close this issue

@ulville
Copy link
Owner

ulville commented May 22, 2023

Screenshot from 2023-05-22 20-21-16

@4JX BTW I just realised the screenshot you've posted looks different then mine (especially the titles) and looks more like an older version of the extension. Latest version should look something like this:
Ekran Görüntüsü - 2023-05-23 00-02-26

(text at the left, icons at the right)

It may be something about the theme you're using but just wanted to make sure you're working with the latest version of the code base

@4JX
Copy link

4JX commented May 22, 2023

Patch was originally against v12 (stable release channel, what my pc is on) but the commit above does patch v15 ("rolling release", latest)

Screenshot from 2023-05-22 23-13-39

@4JX
Copy link

4JX commented May 23, 2023

PR was merged NixOS/nixpkgs#233642. If anyone stumbles upon this check https://nixpk.gs/pr-tracker.html?pr=233642 for the status.

@seandheath This might interest you ^

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants