3

I was running several apps that were installed with Snap Store. I was not using the system for some time and blindly run

sudo apt-get update sudo apt-get upgrade sudo snap refresh 

after reboot bdzionk. When I start any of these apps or even snap-store itself it just silently finishes. Everything else works as expected.

To better diagnose the problem I tried to start the apps with command line:

pdebski@system:~$ ps -ea | grep snap 764 ? 00:00:01 snapd pdebski@system:~$ snap list Name Version Rev Tracking Publisher Notes chromium 83.0.4103.61 1165 latest/stable canonical✓ - core 16-2.45 9289 latest/stable canonical✓ core core18 20200427 1754 latest/stable canonical✓ base gnome-3-28-1804 3.28.0-17-gde3d74c.de3d74c 128 latest/stable canonical✓ - gtk-common-themes 0.1-36-gc75f853 1506 latest/stable canonical✓ - kde-frameworks-5-core18 5.61.0 32 latest/stable kde✓ - midori v8.0-31-gf6b3b1e 550 latest/stable kalikiana - snap-store 3.31.1+git187.84b64e0b 415 latest/stable canonical✓ - snapd 2.45 7777 latest/stable canonical✓ snapd pdebski@system:~$ snap run snap-store /snap/snap-store/415/bin/desktop-launch: line 51: /home/pdebski/.config/user-dirs.dirs: Permission denied 18:13:30:0737 GLib-GIO g_app_info_get_name: assertion 'G_IS_APP_INFO (appinfo)' failed 18:13:30:0740 Gtk Failed to load module "appmenu-gtk-module" Unable to init server: Could not connect: Connection refused 18:13:30:0746 Gtk cannot open display: :1 pdebski@system:~$ ls -l .co*/u*s -rw------- 1 pdebski pdebski 632 mar 21 2018 .config/user-dirs.dirs 

I do not want user-dirs.dirs or any other file in my home directory world-readable, nevertheless I changed the permissions to check what happens:

pdebski@system:~/.config$ chmod go+r u*s pdebski@system:~/.config$ ls -ld . drwxr-xr-x 27 pdebski pdebski 4096 cze 5 19:52 . pdebski@system:~/.config$ ls -al u* -rw-r--r-- 1 pdebski pdebski 632 mar 21 2018 user-dirs.dirs pdebski@system:~/.config$ ls -ald ../.c*g drwxr-xr-x 27 pdebski pdebski 4096 cze 5 19:52 ../.config pdebski@system:~/.config$ snap-store /snap/snap-store/415/bin/desktop-launch: line 51: /home/pdebski/.config/user-dirs.dirs: Permission denied 20:45:44:0906 GLib-GIO g_app_info_get_name: assertion 'G_IS_APP_INFO (appinfo)' failed 20:45:44:0951 Gtk Failed to load module "appmenu-gtk-module" Unable to init server: Could not connect: Connection refused 20:45:45:0012 Gtk cannot open display: :1 

I am stuck. What's wrong?

7
  • 1
    How are you installing your snap packages? In my experience, snap packages are installed for all users and require root privileges user to install them (i.e. sudo snap install hello-world). Researching this issue, I did find that snap allows a user to login to a store with snap login, and then they are allowed to install user level snaps, so maybe that is what snap-store is doing. Commented Jun 5, 2020 at 18:59
  • Some time ago Snap Store was running as expected and and the apps were running as well. I was not using the system for some time and blindly run apt-get update ; apt-get upgrade ; snap refresh after reboot all runs except snap-installed apps. Commented Jun 5, 2020 at 19:05
  • 1
    Are the posted commands/output from a session belonging to pdebski or some other user? From what you have provided, I would expect things to work when logged in as pdebski, but as you noted it will likely not work with other users unless you allow them to read the contents of your $HOME directory. Commented Jun 5, 2020 at 19:11
  • Yes, I run the commands as pdebski (me) Commented Jun 5, 2020 at 19:13
  • 1
    Ah, then did the permissions of the /home/pdebski/.config/user-dirs.dirs directory (or parent directory) get set to owned by root or some other user, preventing pdebski from reading them? Commented Jun 5, 2020 at 19:26

6 Answers 6

3

I have manjaro but had this issue already several times, a quick snap store reinstall solved this (try following their instructions https://snapcraft.io/snap-store)

and now I have rectangles instead text characters, which I can solve via:

sudo rm /var/cache/fontconfig/* sudo rm ~/.cache/fontconfig/* 
1

I had the same error recently coming up and indeed removing and installing the snap fixed the problem. I looked at the permissions (from snap-store after the reinstallation) of a particular snap before and after and it seems that somehow all the permissions have been reset so it's clear why this is failing.

Before the removal and (re)installation all those permissions were disabled: permissions for discord as an example

I don't know of a better way than to reinstall each affected snap.

0

Thanks @borabora indeed reinstalling snap-store helps:

$ snap help The snap command lets you install, configure, refresh and remove snaps. Snaps are packages that work across many different Linux distributions, enabling secure delivery and operation of the latest apps and utilities. Usage: snap <command> [<options>...] Commands can be classified as follows: Basics: find, info, install, list, remove ...more: refresh, revert, switch, disable, enable History: changes, tasks, abort, watch Daemons: services, start, stop, restart, logs Commands: alias, aliases, unalias, prefer Configuration: get, set, unset, wait Account: login, logout, whoami Permissions: connections, interface, connect, disconnect Snapshots: saved, save, check-snapshot, restore, forget Other: version, warnings, okay, ack, known, model, create-cohort Development: run, pack, try, download, prepare-image For more information about a command, run 'snap help <command>'. For a short summary of all commands, run 'snap help --all'. $ snap refresh snap-store snap "snap-store" has no updates available $ snap remove snap-store snap-store removed $ snap install snap-store snap-store 3.31.1+git187.84b64e0b from Canonical✓ installed $ snap-store 21:58:29:0941 Gtk Failed to load module "appmenu-gtk-module" 21:58:30:0253 GsPluginOdrs failed to get distro name: Failed to open file “/var/lib/snapd/hostfs/etc/os-release”: Permission denied 21:58:30:0287 Gs enabled plugins: odrs, rewrite-resource, snap, icons, key-colors, key-colors-metadata 21:58:30:0288 Gs disabled plugins: appstream, desktop-categories, desktop-menu-path, dpkg, dummy, epiphany, fedora-pkgdb-collections, generic-updates, hardcoded-blacklist, hardcoded-featured, hardcoded-popular, modalias, os-release, provenance, provenance-license, repos, shell-extensions 21:58:34:0513 Gs failed to create an app for */*/*/*/system/* 21:58:34:0516 Gs updates-shell: failed to get updates: no plugin could handle get-updates 21:58:34:0516 Gs failed to create an app for */*/*/*/system/* 21:58:34:0516 Gs failed to get system app 21:58:34:0541 GsPluginSnap Failed to load snap icon: local snap has no icon 21:58:34:0552 Gs Only 0 apps for recent list, hiding 21:58:34:0565 Gs hiding category graphics featured applications: found only 0 to show, need at least 9 21:58:34:0777 Gs hiding category audio-video featured applications: found only 0 to show, need at least 9 21:58:35:0147 GsPluginSnap Failed to load snap icon: local snap has no icon 21:58:35:0350 GsPluginSnap Failed to load snap icon: local snap has no icon 21:58:35:0767 GsPluginSnap Failed to load snap icon: local snap has no icon 

(snap-store window appears)

Notice different error messages - apparently snap-store quality requires more refining.

Probably during the system update kernel or some libs were updated which broke compatibility. It was not necessary to reinstall other Snap apps. Reinstalling just the store fixed prereqs automatically for all other apps.

0

Reinstalling the snap-store didnt help me. It wasnt installed to begin with. I ended up reinstalling snapd with apt (remove and install) and then also reinstalling each snap because they showed broken in snap list (snap remove install).

0

Reconfiguring snapd worked for me: sudo dpkg-reconfigure snapd

-1
snap list 

proceed by removing and reinstalling all broken app

sudo snap remove core20 
sudo snap install core20 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.