Fixing a bad Snap update

Quick Code Section

If you don’t want to read my excellent prose … here’s the summary:

sudo snap revert remmina

Some background

I was merrily working on my Ubuntu machine at work (yes … I’m able to do 95% of my job on a Linux box, we’ve come far in the past couple of years, no more compiling my own kernel for Gentoo) then, all of a sudden, my Remmina remote connections all closed. I have four monitors and each typically has a Remmina instance on it … so everything going away was very noticeable.

I tried reconnecting using my Elgato Stream Deck buttons (controlled by streamdeck-ui, of course) but was greeted by a TLS certificate issue. None of my 20+ connections worked, I even tried changing my connection security preferences.

Then I tried the trick every computer wizard knows … reboot!

Nope, no luck. So I started digging.

Many many months ago I was looking for an RDP client that works well on Ubuntu and found Remmina (which has its own issues RDP from Ubuntu to Windows) but the apt version was woefully out-of-date. So I chose to install the snap version:

sudo snap install remmina

The Issue

Snap will automatically update your packages, you can see when it’ll do the update by typing:

snap refresh --time

If that’s not a convenient time you can change it by typing (in military time, so 18:00 would be 6:00 pm … a much better system of time keeping in my opinion):

sudo snap set system refresh.timer=01:00-02:00

See the Snapcraft article explaining updates, but back to the issue at hand …

Snap update my package to this:

name:      remmina
summary:   Remote Desktop Client
publisher: Remmina Upstream Developers (remmina)
store-url: https://snapcraft.io/remmina
contact:   https://gitlab.com/Remmina/Remmina/issues
license:   unset
description: |
  Remmina is a remote desktop client written in GTK+, aiming to be useful for
  system administrators and travellers, who need to work with lots of remote
  computers in front of either large monitors or tiny netbooks.
  
  Remmina supports multiple network protocols in an integrated and consistent user interface.
  
  Currently RDP, VNC, SPICE, NX, XDMCP, SSH and WWW are supported.
  
  Remmina is free and open-source software, released under GNU GPL license.
commands:
  - remmina.pyhoca-cli
  - remmina
  - remmina.winpr-hash
  - remmina.winpr-makecert
  - remmina.wlfreerdp
  - remmina.xfreerdp
  - remmina.xprop
services:
  remmina.ssh-agent: simple, enabled, inactive
snap-id:      XC73ux8XOHjoahd9keAyvM3LVkPBLTzy
tracking:     latest/stable
refresh-date: today at 08:36 PST
channels:
  latest/stable:    v1.4.24+git2.735158e81 2022-02-10 (5193) 113MB - 
  latest/candidate: ↑                                              
  latest/beta:      ↑                                              
  latest/edge:      v1.4.24+git2.735158e81 2022-02-10 (5194) 113MB - 
installed:          v1.4.24+git2.735158e81            (5193) 113MB - 

Which you can see by typing:

snap info remmina

Notice something strange? The latest/edge and latest/stable channels match exactly … which is probably a mistake and the most likely cause of my current issues.

The Fix

I wanted to revert back to the previous version of Remmina (which worked) but couldn’t find a list of versions that I could choose from … I’m sure someone can find a list, if that’s you … please let me know in the comments and I’ll update this section.

Thankfully Snap has a way to revert a package to whatever version was installed before the update happened … which is what I ended up doing. If you type:

snap revert -h

You’ll get the following explanation:

Usage:
  snap revert [revert-OPTIONS] <snap>

The revert command reverts the given snap to its state before
the latest refresh. This will reactivate the previous snap revision,
and will use the original data that was associated with that revision,
discarding any data changes that were done by the latest revision. As
an exception, data which the snap explicitly chooses to share across
revisions is not touched by the revert process.

[revert command options]
      --no-wait     Do not wait for the operation to finish but just print the change id.
      --devmode     Put snap in development mode and disable security confinement
      --jailmode    Put snap in enforced confinement mode
      --classic     Put snap in classic mode and disable security confinement
      --revision=   Revert to the given revision

So all you need to do is type:

sudo snap revert remmina

And if everything works correctly (which is always the case … right?) you should get the following output:

remmina reverted to v1.4.23

Problem solved … it was a snap (sorry … but you knew it was coming)!!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.