Snap creates redundant duplicate directories in home folder

Bug #1746710 reported by Michal Kukuča
254
This bug affects 56 people
Affects Status Importance Assigned to Milestone
snapcraft (Ubuntu)
Invalid
Undecided
Unassigned
snapd (Ubuntu)
Invalid
High
Unassigned

Bug Description

On first launch of certain applications installed via snap install, or from snap via Software center, redundant directories get created in the home folder, if the system uses a different locale then English.

I'm using Ubuntu 17.10 with Slovak locale.

My home folder:
backup.sh Hudba Plocha Stiahnuté Video
core Obrázky snap Šablóny winbox.desktop
Dokumenty PlayOnLinux's virtual drives Steam Verejné

> snap install mailspring
> mailspring 1.1.2 from 'foundry376' installed

Home folder still the same:
backup.sh Hudba Plocha Stiahnuté Video
core Obrázky snap Šablóny winbox.desktop
Dokumenty PlayOnLinux's virtual drives Steam Verejné

But after the app gets launched:
backup.sh Downloads PlayOnLinux's virtual drives Stiahnuté Videos
core Hudba Plocha Šablóny winbox.desktop
Desktop Music Public Templates
Documents Obrázky snap Verejné
Dokumenty Pictures Steam Video

The newly created english directories are all empty.

The same thing happens with other GUI software, like Brave, Spotify...

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: snapd 2.29.4.2+17.10
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: GNOME
Date: Thu Feb 1 11:57:14 2018
InstallationDate: Installed on 2017-10-20 (104 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=sk_SK.UTF-8
 SHELL=/bin/bash
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michal Kukuča (michalmaria) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicolás Martín (nikomartn2) wrote :

Same bug on Spanish language, 16.04, 4.13.0-32-generic, unity.

Also, someone asked on Spotify Community about the same issue:
https://community.spotify.com/t5/Desktop-Linux/Spotify-client-is-creating-folders-in-my-Home/td-p/4365895

Revision history for this message
Daniele Faugiana (turbopapero) wrote :

Same here on Ubuntu 17.10 (Gnome) with snap package of Spotify. Once I start Spotify I have all default home folders duplicated (one directory named in English, one named in Italian).

Revision history for this message
Mateusln (mateusln) wrote :
Revision history for this message
Dario Menin (darioalessio-menin) wrote :

Also confirmed in Ubuntu 16.04.3 LTS 4.13.0-32-generic #35~16.04.1-Ubuntu SMP, (it-IT language).

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could somebody post about that on https://forum.snapcraft.io ?

Revision history for this message
Michal Kukuča (michalmaria) wrote :
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

this bug makes using snaps "ugly" on non-default locales, bumping the severity due to that

Changed in snapd (Ubuntu):
importance: Undecided → High
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

fwiw, flatpak doesn't suffer from this

Revision history for this message
Dario Menin (darioalessio-menin) wrote :

I can confirm this on

Distributor ID: Ubuntu
Description: Ubuntu Bionic Beaver (development branch)
Release: 18.04
Codename: bionic

For example using the VLC snap.

Revision history for this message
Sergei (markovs-i-mail) wrote :

Stil no resolution? It's annoying!

Revision history for this message
Kirill Romanov (djaler1) wrote :

I can confirm this on elementary OS 0.4 Loki (based on Ubuntu 16.04)

tags: added: bionic
Revision history for this message
Willem Hobers (whobers) wrote :

Testing Xubuntu 18.04, this happens as well.
Linux Xubuntu-18-04 4.15.0-12-generic #13-Ubuntu SMP Thu Mar 8 06:24:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
vervelover (alessiopangos) wrote :

Still there on a fully updated Ubuntu 18.04 install (italian language), definitely a very annoying bug.

John Lenton (chipaca)
no longer affects: snappy
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Can someone affected list the set of snaps that they have that may be causing this? We can track this down to the specific snap and then figure out what is causing the issue.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Ah, I see mailspring is enough to reproduce this.

Revision history for this message
ValiDOM (validom) wrote :

Also affects Ubuntu 18.04 beta.

Revision history for this message
Sebastien Bacher (seb128) wrote :

That's a problem in the desktop launcher and https://github.com/ubuntu/snapcraft-desktop-helpers/pull/103 should resolve the issue

Revision history for this message
John Lenton (chipaca) wrote :

Marked as invalid for snapd (it's not a snapd bug)

Changed in snapd (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

is snapcraft a better target then?

affects: snapd (Ubuntu) → snapcraft (Ubuntu)
Changed in snapcraft (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Jukka (jukkaleppikangas-elisanet) wrote :

This bug will likely be a larger problem in 18.04. Some of the default applications of a standard Ubuntu installation seem to be snap packages. Some of them, like gnome-logs and gnome-characters, reveal the bug. It is quite annoying indeed.

Revision history for this message
Dario Menin (darioalessio-menin) wrote :

I hope that the fix in https://github.com/ubuntu/snapcraft-desktop-helpers/pull/103 will land soon, this is totally not acceptable in an LTS release.

In addition to the annoyance of the duplicated directories, this can be unsafe, I imagine a flow like this:
1) user starts a snap application
2) duplicated directories appear
3) the user doesn't notice immediately, opens another application (es. Libreoffice Writer) and saves a file in "Documents" instead of "Documenti" (italian locale) because the name is similar. maybe he notices something strange but attributing the duplicated names to a temporary glitch
4) user finally notices that this keeps happening, checks the home directory through the file manager and then deletes all the directories with strange names
5) The file is gone and maybe two hours of the user's time (i think of a student writing a document as homework)

We'll see things like this happening often with this kind of bug. Maybe it seems harmless for technical people, but a large slice of Ubuntu users aren't technical at all and can easily get confused from this behaviour.

Revision history for this message
Erikcht (qrcyen) wrote :

This problem persist on ubuntu 18.04
I am using portuguese Brazil translate for my system

Directories creating directory called "desktop", "Documents", "Templates", "Videos", "Music" "Pictures" and " Public ".

This bug is so normal to appear that even a Brazilian youtuber called "diolinux" reported in the release review video
https://www.youtube.com/watch?v=rqkSMaqdhXE

Revision history for this message
Dario Menin (darioalessio-menin) wrote :

Just to clarify the situation: here https://github.com/ubuntu/snapcraft-desktop-helpers/issues/92#issuecomment-385644966 one of the desktop helper maintainers says that to solve the problem snaps must be rebuilt using the latest desktop helper. This because snapcraft-desktop-helpers is a build tool and so the fix can't be propagated to existing snaps.

The correct way to address the issue is to contact the specific snap maintainer.

Revision history for this message
Andreas Pfeil (der-andreas-pfeil) wrote :

Aren't the packages hosted more or less centrally? Isn't it possible to rebuild most snaps automatically? This is a serious usability issue appearing on an LTS, after all. Snaps are heavily promoted in the Ubuntu 18.04 Software Center. This should not be ignored, at least for default or promoted apps.

Revision history for this message
Fernando (fernandofernandez01) wrote :

Still happening in 18.04. Since I have the Spanish version, it leads to multiple redundant directories, but with different names like "Documents" and "Documentos", "Descargas" and "Downloads", etc. Is a really annoying issue.

Revision history for this message
Diogo Filho de Morais (braxmann) wrote :

I discovered when the problem happens. When we open a snap program and access the files.

It happened now when I opened VLC and I searched for a folder. Personal folders for documents, music, and more were duplicated.

Revision history for this message
Dario Menin (darioalessio-menin) wrote :

The solution is to contact the snap maintainer, for example for VLC https://snapcraft.io/vlc -> Contact Jean-Baptiste Kempf (VLC).

The maintainer must rebuild the snap, as they said here https://github.com/ubuntu/snapcraft-desktop-helpers/issues/92#issuecomment-385644966.

Revision history for this message
kerozoli (kerozoli) wrote :

It's a little bit funny that snap team couldn't

a, rebuild all snap in the store centrally
b, can't notify all snap maintainers to do that

Revision history for this message
Diogo Filho de Morais (braxmann) wrote :

This problem occurs with all the snap packages I've opened. This occurs only when the program is first opened and the event does not repeat itself again when I reopen the program.

Revision history for this message
Erkan ÜNLÜTÜRK (erkan-unluturk) wrote :

I have the same problem.

Ubuntu 18.04 LTS, Turkish language.

Revision history for this message
Owen Llywelyn (owen-llywelyn) wrote :

Same problem.

Ubuntu 18.04 LTS Cymraeg / Welsh

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I added snapd again as portals should solve this

affects: snapcraft (Ubuntu) → snapd (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapcraft (Ubuntu):
status: New → Confirmed
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Sergio, see comment from Seb above. It's the launcher, and rebuilding apparently solves the problem. We won't pack the launcher in snapd.

If you have some more information about why that's still a bug in snapd, then please talk to us or provide good details about why the affected applications above will be solved by a change in snapd, and what that change is.

Changed in snapd (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

This was a bug on the launcher which lived outside of Snapcraft.
That said, future bugs occurring with the gnome extension, introduced in Snapcraft 3.8, would indeed be Snapcraft (the tool) bugs.

Changed in snapcraft (Ubuntu):
status: Confirmed → Invalid
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.