r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.36k stars 160 forks source link

Gnome Shell extensions attempts to update on Plasma and fails #779

Closed Worble closed 2 years ago

Worble commented 2 years ago

What did you expect to happen? Topgrade to run successfully.

What actually happened? Gnome Shell extensions attempts to update even though I'm using Plasma, and subsequently errors with

―― 11:19:32 - Gnome Shell extensions ―――――――――――――――――――――――――――――――――――――――――――
Usage:
  gdbus call [OPTION…]

Invoke a method on a remote object.

Connection Endpoint Options:
  -y, --system          Connect to the system bus
  -e, --session         Connect to the session bus
  -a, --address         Connect to given D-Bus address

Application Options:
  -d, --dest            Destination name to invoke method on
  -o, --object-path     Object path to invoke method on
  -m, --method          Method and interface name
  -t, --timeout         Timeout in seconds

Retry? (y)es/(N)o/(s)hell

Additional details:

topgrade -v Output:

 2021-10-26T10:21:42.003Z DEBUG topgrade::utils      > Detected "/usr/bin/gdbus" as "gdbus"
―― 11:21:42 - Gnome Shell extensions ―――――――――――――――――――――――――――――――――――――――――――
 2021-10-26T10:21:42.003Z DEBUG topgrade::executor   > Running "/usr/bin/gdbus" "call" "--session" "--dest" "rg.gnome.Shell.Extensions" "--object-path" "org/gnome/Shell
/Extensions" "-method" "org.gnome.Shell.Extensions.CheckForUpdates"
Usage:
  gdbus call [OPTION…]

Invoke a method on a remote object.

Connection Endpoint Options:
  -y, --system          Connect to the system bus
  -e, --session         Connect to the session bus
  -a, --address         Connect to given D-Bus address

Application Options:
  -d, --dest            Destination name to invoke method on
  -o, --object-path     Object path to invoke method on
  -m, --method          Method and interface name
  -t, --timeout         Timeout in seconds

 2021-10-26T10:21:42.005Z DEBUG topgrade::runner     > Step "Gnome Shell Extensions" failed: exit status: 1
 2021-10-26T10:21:42.005Z DEBUG topgrade::terminal   > Desktop notification: Gnome Shell Extensions failed

Retry? (y)es/(N)o/(s)hell
Worble commented 2 years ago

Correction, the previous error was based on the spelling mistakes fixed in #778, however running the master branch gives this error instead, presumably for the same reasoning as stated above:

―― 11:55:33 - Gnome Shell extensions ―――――――――――――――――――――――――――――――――――――――――――
Error: org/gnome/Shell/Extensions is not a valid object path

Retry? (y)es/(N)o/(s)hell

topgrade -v Output:

 2021-10-26T10:56:35.710Z DEBUG topgrade::runner     > Step "Gnome Shell Extensions"
 2021-10-26T10:56:35.710Z DEBUG topgrade::utils      > Detected "/usr/bin/gdbus" as "gdbus"

―― 11:56:35 - Gnome Shell extensions ―――――――――――――――――――――――――――――――――――――――――――
 2021-10-26T10:56:35.710Z DEBUG topgrade::executor   > Running "/usr/bin/gdbus" "call" "--session" "--dest" "org.gnome.Shell.Extensions" "--object-path" "org/gnome/Shel
l/Extensions" "--method" "org.gnome.Shell.Extensions.CheckForUpdates"
Error: org/gnome/Shell/Extensions is not a valid object path
 2021-10-26T10:56:35.712Z DEBUG topgrade::runner     > Step "Gnome Shell Extensions" failed: exit status: 1
 2021-10-26T10:56:35.712Z DEBUG topgrade::terminal   > Desktop notification: Gnome Shell Extensions failed
yochananmarqos commented 2 years ago

I receive the same output on GNOME.

tranzystorekk commented 2 years ago

I am getting this error on a WSL2 instance of Arch Linux (no desktop environment), where gdbus is part of the glib2 package, which is a dependency for many packages:

❯ pactree -r glib2
glib2
├─conmon
│ └─podman
├─gettext
│ ├─base
│ └─bison
├─harfbuzz
│ └─freetype2
│   ├─fontconfig
│   │ └─imagemagick
│   │   └─wslu
│   ├─harfbuzz
│   └─libraqm
│     └─imagemagick
├─libcroco
│ └─gettext
├─liblqr
│ └─imagemagick
├─libsecret
│ └─pinentry
│   └─gnupg
│     └─gpgme
│       ├─pacman
│       │ ├─arch-install-scripts
│       │ ├─base
│       │ ├─pacman-contrib
│       │ ├─pacutils
│       │ │ └─trizen
│       │ └─trizen
│       └─podman
├─libslirp
│ └─slirp4netns
│   └─podman
├─pinentry
└─slirp4netns
MCOfficer commented 2 years ago

Can you try if installing gnome-shell does the trick? or do you need gnome-shell-extensions?

In case of the former we could check if gnome-extensions is in PATH and skip the step if it isn't.

ETCaton commented 2 years ago

This also happens on macOS

StelFux commented 2 years ago

@Worble, I think I found the error: the object path must start with /. But for me, the command employee does not allow to update the extensions but just to check if there are updates available.

Bad3r commented 2 years ago

I am experiencing the same issue.

How can I disable this step? I tried to add

disable = ["gdbus"]
# and
disable = ["Gnome Shell Extensions"]

Both are unknown variant, and it causes topgrade to throw an error message

2021-10-26T17:21:13.823Z ERROR topgrade::config > Failed to deserialize /home/$USER/.config/topgrade.toml
2021-10-26T17:21:13.823Z ERROR topgrade::config > failed to load configuration: unknown variant `gdbus`,expected one of `asdf`, `atom`, `brew_cask`, `brew_formula`, `bin`, `cargo`, `chezmoi`, `chocolatey`, `choosenim`, `composer`, `custom_commands`, `deno`, `dotnet`, `emacs`, `firmware`, `flatpak`, `flutter`, `fossil`, `gcloud`, `gem`, `git_repos`, `haxelib`, `gnome_shell_extensions`, `home_manager`, `jetpack`, `krew`, `macports`, `mas`, `micro`, `myrepos`, `nix`, `node`, `opam`, `pacstall`, `pearl`, `pipx`, `pip3`, `pkg`, `pkgin`, `pnpm`, `powershell`, `raco`, `remotes`, `restarts`, `rtcl`, `rustup`, `scoop`, `sdkman`, `silnite`, `sheldon`, `shell`, `snap`, `stack`, `system`, `tldr`, `tlmgr`, `tmux`, `vagrant`, `vcpkg`, `vim`, `winget`, `wsl`, `yadm` for key `disable` at line 96 column 1

Edit: To disable it, add gnome_shell_extensions to $XDG_CONFIG_HOME/topgrade.toml

disable = ["gnome_shell_extensions"]
onefish2 commented 2 years ago

This is happening to me on RHEL 8, Manjaro various desktops Gnome or not. Raspberry Pi OS, Ubuntu Server 20.04 (no desktop installed), Arch etc.

edoardottt commented 2 years ago

Same on Ubuntu 21.10, if I type the command run by topgrade (https://github.com/r-darwish/topgrade/blob/develop/src/steps/os/unix.rs#L138-L151): $> gdbus call --session --dest org.gnome.Shell.Extensions --object-path org/gnome/Shell/Extensions --method org.gnome.Shell.Extensions.CheckForUpdates
I get this error:
Error: org/gnome/Shell/Extensions is not a valid object path

omid commented 2 years ago

@edoardottt read https://github.com/r-darwish/topgrade/issues/779#issuecomment-951819419 & https://github.com/r-darwish/topgrade/issues/779#issuecomment-952151569

edoardottt commented 2 years ago

@omid Thank you, but I would like to have this fixed ... if possible, As a workaround I can just type N when asked to retry

omid commented 2 years ago

@edoardottt or you can follow https://github.com/r-darwish/topgrade/issues/779#issuecomment-952157346 to disable it

modularTaco commented 2 years ago

@Worble, I think I found the error: the object path must start with /. But for me, the command employee does not allow to update the extensions but just to check if there are updates available.

This is the correct behavior, the method called is checkForUpdates which only checks the gnome extensions for updates and gnome installs pending updates on the next login (check https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/906 for reference)

r-darwish commented 2 years ago

Can any gnome user tell whether gnome sets some environment variable that we can check to see if we're running inside gnome?

yochananmarqos commented 2 years ago

@r-darwish

❯ echo $XDG_CURRENT_DESKTOP
GNOME
r-darwish commented 2 years ago

Thanks @yochananmarqos. Should be fixed now

frezbo commented 2 years ago

@r-darwish when running topgrade --verbose --only gnome_shell_extensions

I see

―― 10:40:58 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Gnome Shell Extensions: SKIPPED: Desktop doest not appear to be gnome
 2021-10-29T05:10:58.821Z DEBUG topgrade::terminal   > Desktop notification: Topgrade finished successfully

even though I'm running gnome

Output of XDG_CURRENT_DESKTOP

echo $XDG_CURRENT_DESKTOP
pop:GNOME

OS details

cat /etc/os-release
NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os