Skip to content
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

Failure to Enable Extensions without gnome restart #25

Closed
starr-dusT opened this issue Nov 21, 2022 · 7 comments
Closed

Failure to Enable Extensions without gnome restart #25

starr-dusT opened this issue Nov 21, 2022 · 7 comments
Labels

Comments

@starr-dusT
Copy link

starr-dusT commented Nov 21, 2022

Hello. Love this role as setting keybinds within Gnome is one of my least favorite things! I've noticed issues with enabling extensions, but hopefully I'm just missing something...

If I install and enable extensions like this:

- name: Install gnome extensions
  include_role:
    name: ansible-role-customize-gnome
  vars:
    gnome_extensions:
      # https://extensions.gnome.org/extension/779/clipboard-indicator
      - id: 779
        enable: yes
    gnome_user: "{{ user }}"

The playbook fails during the enable task with:

failed: [local] (item=clipboard-indicator@tudmotu.com) => {"ansible_loop_var": "item", "changed": true, "cmd": ["gnome-extensions", "enable", "clipboard-indicator@tudmotu.com"], "delta": "0:00:00.004735", "end": "2022-11-20 17:49:04.738565", "item": {"ansible_loop_var": "item", "changed": false, "cmd": ["gnome-shell-extension-tool", "-e", "clipboard-indicator@tudmotu.com"], "delta": "0:00:00.094940", "end": "2022-11-20 17:49:04.205121", "failed": false, "failed_when_result": false, "invocation": {"module_args": {"_raw_params": "gnome-shell-extension-tool -e clipboard-indicator@tudmotu.com", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true}}, "item": {"enable": true, "id": 779, "name": "clipboard-indicator@tudmotu.com", "url": "https://extensions.gnome.org/download-extension/clipboard-indicator@tudmotu.com.shell-extension.zip?version_tag=35596"}, "msg": "", "rc": 0, "start": "2022-11-20 17:49:04.110181", "stderr": "gnome-shell-extension-tool is deprecated, use gnome-extensions instead\nExtension “clipboard-indicator@tudmotu.com” does not exist", "stderr_lines": ["gnome-shell-extension-tool is deprecated, use gnome-extensions instead", "Extension “clipboard-indicator@tudmotu.com” does not exist"], "stdout": "", "stdout_lines": []}, "msg": "non-zero return code", "rc": 2, "start": "2022-11-20 17:49:04.733830", "stderr": "Extension “clipboard-indicator@tudmotu.com” does not exist", "stderr_lines": ["Extension “clipboard-indicator@tudmotu.com” does

The error indicates it cannot find an installed extension to enable and if I manually list extensions with gnome-extenions list the desired extension isn't listed. If I restart Gnome and run the playbook again the enable works and the extension is shown with gnome-extenions list. Is this expected behavior or am I missing something here? Thanks!

@PeterMosmans
Copy link
Owner

Hey @starr-dusT - thanks for reporting this issue. The extension should be available, without the need for restarting Gnome. I'll classify this as a bug, and will look into it - although it may take a while.
Which OS / Gnome version are you using?

@starr-dusT
Copy link
Author

starr-dusT commented Dec 5, 2022

Hey @PeterMosmans. I'm using Fedora 37 along with the Gnome it comes with (43.1). When I have a moment I'll try on another distro/gnome version and see what happens. Thanks for looking into it! It isn't really a huge deal. For now I'm not enabling the extensions through Ansible then enabling them in the extension manager after a reboot.

@CubicrootXYZ
Copy link

Can confirm this happens on Ubuntu 22.04.1 with Gnome 42.2 too.

@PeterMosmans
Copy link
Owner

Thanks for reporting @starr-dusT / @CubicrootXYZ . I'm finally taking a look at this

@PeterMosmans
Copy link
Owner

Hey @CubicrootXYZ / @starr-dusT : I've implemented 2 changes in the extension:

  • Gnome Shell will now be restarted when a new extension has been detected
  • A list of changed extensions will be shown
    If you could test whether this branch fixes your issue before I merge it, that would be awesome: thanks!

https://github.com/PeterMosmans/ansible-role-customize-gnome/compare/enforce-gnome-restart

@CubicrootXYZ
Copy link

@PeterMosmans tried it, still getting the error message but ansible continues now and everything gets installed properly.

@PeterMosmans
Copy link
Owner

Thanks for testing - yeah, the error still shows (I'm a bit hesitant to suppress that), but at least all updates are recognized after 'force reloading' Gnome.
I'll merge this fix and publish a new version. Thanks all for reporting / testing!

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

No branches or pull requests

3 participants