Had to reinstall, lost all subscriptions and history

Bug #2043519 reported by Stephen Boddy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Freetube
Opinion
Low
Unassigned

Bug Description

OK, kicking myself because partly my own damn fault. However, something went wonky with FreeTube and it stopped launching. On the command line I was getting:

"Content snap command-chain for /snap/freetube/25/gnome-platform/command-chain/desktop-launch not found: ensure slot is connected"

After hunting similar issues online, I tried connecting the plug/slot using:
snap connect freetube:gnome-42-2204 gnome-42-2204:gnome-42-2204
but still no joy.

So I tried snap remove, then snap install. This lost *all* subscriptions/history. After investigating, this snap is storing the config under ~/snap/freetube/<version>/.config/FreeTube/profiles.db, but the entire <version> folder is deleted when removing the snap. Now luckily, snap does make a backup of the removed data, but it is not immediately obvious to a casual user that this happens, and I cannot imagine a non-technical user finding the right information to find and recover everything.

I also wonder what happens when you publish a new version. Will version 26 copy the version 25 folder, or will everything get deleted then?

*Please* address this. Removing a snap should *never* delete user config/settings.

In case anyone else has this issue:
"snap saved" will show the saved data of removed snaps. These are stored in /var/lib/snapd/snapshots. You can copy and unpack the right archive, find your user(s) data, and copy it back into the users snap/freetube directory. You will need root privileges to do this. After doing this I got all my subs and history restored. (Phew!)

Changed in freetube:
status: New → Opinion
importance: Undecided → Low
assignee: nobody → Sameer Sharma (capecrusader-121)
Revision history for this message
Sameer Sharma (sameersharma2006) wrote (last edit ):

Hey there glad you solved your problem 😀 !

Regarding,

> I also wonder what happens when you publish a new version. Will version 26 copy the version 25 folder, or > will everything get deleted then?
> *Please* address this. Removing a snap should *never* delete user config/settings.

As for upgrades under ~/snap/freetube , you will find two folders common and current, these folders store your app configs, preferences etc. and they aren't affected by app upgrades/revision changes as they are accesible to all revisions usually.

Regarding removal typically the folder in the home directory remains unaffected in some cases although as part of consistency it ends up removing the data inside as the user has asked the underlying snapd to remove the snap and hence the user should expect data to be removed too But i have observed if you don't mess with the home folder snap configs files upon re-installation some snaps do remember previous configs.

As for,

> Content snap command-chain for /snap/freetube/25/gnome-platform/command-chain/desktop-launch not found: ensure slot is connected

You should contact snapd community or your maintainer of snapd package itself as it doesn't have anything to do with the app itself.

--> https://forum.snapcraft.io/

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

"As for upgrades under ~/snap/freetube , you will find two folders common and current, these folders store your app configs, preferences etc. and they aren't affected by app upgrades/revision changes as they are accesible to all revisions usually."

I beg to differ.

"current" is a symbolic link to the <version> folder (currently 25 for FreeTube). It is in this folder that the users subs and history are stored. So when version 25 of the snap is removed, this folder is being removed (although backed up as already mentioned). I only installed FreeTube a week or two ago when YouTube started blocking AdBlockers, and until this issue, I never made any changes or modifications to FreeTubes folders or file. I honestly didn't even know much about how snaps work at all. I also didn't tell snap to remove user data when removing the snap. So I still think there is an end-user usability/expectations issue here, but until such time as you release a version 26 I won't know if it is just for remove/install cycles, or if it is also an issue for updates.

Thanks for responding so quick anyway.

Revision history for this message
Sameer Sharma (sameersharma2006) wrote (last edit ):

Hmm, to tell you , i have been using freetube snap from Rev.6 , i made custom settings and the fact that i can still use the snap as i configured earlier with latest revisions should make it clear that yes with upgrades older configs are synced.

See this doc to understand better, snapd do take care of syncing the configs of different revisions in the home directory.

--> https://snapcraft.io/docs/environment-variables

Hope, that helps. 😃

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote (last edit ):

OK, so that sounds like updates (or more accurately refreshes) should be OK. Cool. Call me paranoid, but I've put a refresh hold on FreeTube so I get a chance to backup the userdata beforehand... yeah, paranoid.

So this ticket is solely about whether user config/data should be removed from the users folder because the sysadmin removed/reinstalled the snap. I understand the Opinion status, and don't entirely disagree. At least anyone searching for info will hopefully see this ticket once the search engines crawl it, instead of having to figure out what the heck happened by themselves.

Cheers!

Revision history for this message
Sameer Sharma (sameersharma2006) wrote :

As you deem fit, but do remember that sometimes the app has security vulnerabilities and hence needs updates ASAP, like V0.19.1 fixed 'A Webp CVE' for V0.19.0.

Changed in freetube:
assignee: Sameer Sharma (capecrusader-121) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.