Seemingly random snap disconnections and breakage

I think GNOME Clocks disconnected from gnome-3-26-1604 automatically and I don’t know why. I’ve tried looking in journalctl for logs but no luck. I think I looked at the correct times but I use persistent logging to try and catch bugs like these but my logs are flooded with a Discord ptrace denial so they’re not very easy to search through… any idea what might have happened here?

It disconnected again :frowning: I clicked the restart and update button when shutting down recently, maybe that affected it? Not sure…

$ snap run gnome-clocks
/snap/gnome-clocks/72/bin/desktop-launch: line 23: /home/adam/.config/user-dirs.dirs: Permission denied
You need to connect this snap to the gnome platform snap.

You can do this with those commands:
snap install gnome-3-26-1604
snap connect gnome-clocks:gnome-3-26-1604 gnome-3-26-1604

(the '3-26-1604' number defines the platform version and might change)
Clocks 3.26.1 (72) on GNOME 3.26 [Ubuntu 16.04] (64) on `core` 16-2.32.6 (4650)
$ snap info gnome-clocks
tracking:  stable
refreshed: 2018-04-25T14:22:55+01:00
installed:   3.26.1              (72) 6MB -
$ snap info gnome-3-26-1604
tracking:  stable
refreshed: 2018-05-08T17:20:34+01:00
installed:   3.26.0 (64) 146MB -
$ snap info core
tracking:  beta
refreshed: 2018-05-11T15:51:12+01:00
installed:   16-2.32.8                (4650) 90MB core
$ snap version
snap    2.32.8+18.04
snapd   2.32.8+18.04
series  16
ubuntu  18.04
kernel  4.15.0-20-generic

I had refreshed to 16-2.32.8 (4650) in beta, turned my computer off and on again, and then all my snaps (at least, the ones that I tested) refused to launch. I reverted core to 16-2.32.6 and then refreshed back to beta (16-2.32.8) and they started working again, including apparently connecting themselves back to the interfaces they were connected to originally.

I’m not sure how to debug this kind of seemingly random error when journalctl is basically unusable for me :frowning:

Trying to run snaps
$ snap run mailspring
ln: failed to create symbolic link '/home/adam/snap/mailspring/212/.config/gtk-2.0/gtkfilechooser.ini': File exists
$ snap run gimp
/snap/gimp/40/bin/desktop-launch: line 23: /home/adam/.config/user-dirs.dirs: Permission denied
Warning: Schema “org.gnome.system.locale” has path “/system/locale/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
ln: failed to create symbolic link '/home/adam/snap/gimp/40/.config/gtk-2.0/gtkfilechooser.ini': File exists
Cannot open display: 
$ snap run spotify

(spotify:573): Gtk-WARNING **: cannot open display: :0
$ snap run talesofmajeyal
WebCore config: library(/snap/talesofmajeyal/10/libte4-web.so) spawn(/snap/talesofmajeyal/10/cef3spawn)
Loading WebCore: Failed loading /snap/talesofmajeyal/10/libte4-web.so: /snap/talesofmajeyal/10/libte4-web.so: cannot open shared object file: No such file or directory
[CPU] Detected 4 CPUs
OpenAL device available: OpenAL Soft (default OpenAL Soft)
xcb_connection_has_error() returned true
shm_open() failed: Permission denied
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Available video driver: x11
Available video driver: mir
Available video driver: wayland
Available video driver: dummy
cannot initialize SDL: Could not initialize UDEV
$ snap run telegram-desktop
QXcbConnection: Could not connect to display :0
Telegram[0x9338cf]
Telegram[0x933e4c]
Telegram(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x382)[0x11d0d0c]
Telegram(_ZN15google_breakpad16ExceptionHandler12HandleSignalEiP9siginfo_tPv+0x1c3)[0x11d08e7]
Telegram(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0x1ab)[0x11d05ff]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f2de6337390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f2de5a72428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f2de5a7402a]
Telegram[0x1f55117]
Telegram(_ZN14QXcbConnectionC2EP19QXcbNativeInterfacebjPKc+0xe93)[0x1624423]
Telegram(_ZN15QXcbIntegrationC1ERK11QStringListRiPPc+0x2ea)[0x15f907a]
Telegram[0x15f7c4b]
Telegram[0x1e1bc1d]
Telegram[0x1b38bad]
Telegram[0x1b397b5]
Telegram[0x2128295]
Telegram[0x1b3ad8f]
Telegram[0x17f8889]
Telegram(_ZN11ApplicationC2EN3gsl8not_nullIPN4Core8LauncherEEERiPPc+0x3a)[0xfcc76a]
Telegram(_ZN4Core8Launcher18executeApplicationEv+0x3e)[0x93088e]
Telegram(_ZN4Core8Launcher4execEv+0x54)[0x930d14]
Telegram(main+0x32)[0x78a2a2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f2de5a5d830]
Telegram(_start+0x29)[0x79b569]
Aborted (core dumped)
$ snap run corebird
You need to connect this snap to the gnome platform snap.

You can do this with those commands:
snap install gnome-3-26-1604
snap connect corebird:gnome-3-26-1604 gnome-3-26-1604

(the '3-26-1604' number defines the platform version and might change)
$ snap run 0ad
Cache: 400 (total: 7678) MiB
TIMER| InitVfs: 14.3613 ms
TIMER| CONFIG_Init: 5.83185 ms
xcb_connection_has_error() returned true
shm_open() failed: Permission denied
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
ERROR: Sound: AlcInit failed, m_Device=0x0 m_Context=0x0 dev_name=OpenAL Soft err=a005

TIMER| shutdown ConfigDB: 1.547 us
ERROR: OpenAL error: (null); called from ~CSoundManager (line 277)

TIMER| resource modules: 7.55308 ms
TIMER TOTALS (9 clients)
-----------------------------------------------------
  tc_png_decode: 0 c (0x)
  tc_pool_alloc: 150.895 kc (3x)
  tc_dds_transform: 0 c (0x)
  tc_transform: 0 c (0x)
  tc_plain_transform: 0 c (0x)
  tc_ShaderValidation: 0 c (0x)
  tc_ShaderGLSLLink: 0 c (0x)
  tc_ShaderGLSLCompile: 0 c (0x)
  xml_validation: 0 c (0x)
-----------------------------------------------------
TIMER| shutdown misc: 341.804 us
Cache: 400 (total: 7678) MiB
TIMER| InitVfs: 187.65 ms
TIMER| CONFIG_Init: 1.62484 ms
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
ERROR: Sound: AlcInit failed, m_Device=0x0 m_Context=0x0 dev_name=OpenAL Soft err=a005

ERROR: SDL library initialization failed: Failed to connect to the Mir Server
terminate called after throwing an instance of 'PSERROR_System_SDLInitFailed'
  what():  System_SDLInitFailed
Aborted (core dumped)
`core` 16-2.32.8 (4650)
$ snap version
snap    2.32.8+18.04
snapd   2.32.8+18.04
series  16
ubuntu  18.04
kernel  4.15.0-20-generic
$ snap info core
tracking:  beta
refreshed: 2018-05-11T15:51:12+01:00
installed:   16-2.32.8                (4650) 90MB core
$ snap info mailspring
tracking:  edge
refreshed: 2018-05-04T17:44:25+01:00
installed:   1.2.2 (212) 164MB -
$ snap info gimp
tracking:  edge
refreshed: 2018-05-15T12:01:49+01:00
installed:   2.10.0 (40) 209MB -
$ snap info spotify
tracking:  stable
refreshed: 2018-03-24T22:32:33Z
installed:   1.0.77.338.g758ebd78-41 (13) 169MB -
$ snap info talesofmajeyal
tracking:  beta
refreshed: 2018-05-04T17:51:43+01:00
installed:   1.5.8 (10) 458MB -
$ snap info telegram-desktop
tracking:  stable
refreshed: 2018-04-09T16:56:46+01:00
installed:   1.2.17                  (142) 100MB -
$ snap info corebird
tracking:  stable
refreshed: 2018-03-08T11:08:05Z
installed:   1.7.4 (90) 30MB -
$ snap info 0ad
tracking:  stable
refreshed: 2018-04-30T10:10:04+01:00
installed:   0.0.22-alpha (13) 875MB -

Given 16-3.28.8 was refreshed 11th May and I originally reported issues 5th May is this potentially a regression in 16-3.28.6 or something?

Hi!

Just wanted to note that I have the same problem. It seams that all my snaps got disconnected. I tried using the command “sudo snap refresh core --candidate” from another post in this forum, but it didn’t help.

PS: @Ads20000 You wrote “I reverted core to 16-2.32.6 and then refreshed back to beta (16-2.32.8) and they started working again, including apparently connecting themselves back to the interfaces they were connected to originally.” Can you explain in more detail what you did there? Thanks!

snap revert core
snap refresh core

Thanks! Seems the problem fixed itself after a reboot without me having to use the commands though.