snap-store Does Not Run with XAUTHORITY error

Bug #1886113 reported by aPlatypus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Expired
Undecided
Unassigned
snapd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

* This system is an upgrade from 19.10 to 20.04.
* The 19.10 install was to a new, empty disk.

* Under 19.10 NO applications installed with snap work when you execute them (reported for several apps) and no response or follow-up. For example gnome-calculator snap failed.
    x As an aside I was happy to see gnome-calculator working again with 20.04
    x I thought the snap bug was fixed. As it happens I discovered gnome-calculator is No loner a snap in 20.04 ~sigh~.

* As it happens I need to revert the installed libreoffice due to a business stopper regression:
    x LibreOffice bug: https://bugs.documentfoundation.org/show_bug.cgi?id=134455

* I clicked on snap store icon, Nothing Happens

* I worked out how to invoke it from the command line and received this message for my reward.

      $ /snap/bin/snap-store --help
    2020/07/03 09:41:32.148183 cmd_run.go:563: WARNING: XAUTHORITY environment value is
    not a clean path: "/Moort/home/william/.Xauthority"
    cannot create user data directory: /home/william/snap/snap-store/467: Not a directory

     $ /snap/bin/snap-store --version
    2020/07/03 09:52:21.034248 cmd_run.go:563: WARNING: XAUTHORITY environment value is
    not a clean path: "/Moort/home/william/.Xauthority"
    cannot create user data directory: /home/william/snap/snap-store/467: Not a directory

    x The message: "/home/william/snap/snap-store/467: Not a directory"

      ... is very familiar. A message looking like that came up when I tried to run/load a
      snap installed appp under 19.10 previously.

* Everything appears OK for XAUTHORITY

     $ echo $XAUTHORITY; ll $XAUTHORITY
    /home/william/.Xauthority
    -rw------- 1 william william 54 Jun 28 11:13 /home/william/.Xauthority

* I don't understand the bug -- That directory definitely exists, witnessed as follows:

      $ ll /home/william/snap/snap-store/ /home/william/snap/snap-store/467
    /home/william/snap/snap-store/:
    total 16
    drwxr-xr-x 4 william william 4096 Jul 3 01:13 ./
    drwxr-xr-x 13 william william 4096 Jul 3 01:13 ../
    drwxr-xr-x 2 william william 4096 Jul 3 01:13 467/
    drwxr-xr-x 2 william william 4096 Jul 3 01:13 common/
    lrwxrwxrwx 1 william william 3 Jul 3 01:13 current -> 467/

    /home/william/snap/snap-store/467:
    total 8
    drwxr-xr-x 2 william william 4096 Jul 3 01:13 ./
    drwxr-xr-x 4 william william 4096 Jul 3 01:13 ../

-----

Anyway the key thing here is that I will not be the only set-up that snap-s fail on. It just appears that something very basic is off-track.

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

Thanks for reporting and sorry for not getting back to you earlier. It seems that we have a mismatch between the contents of the XAUTHORITY environment variable (under /home/william) and the actual location of the file on the filesystem (under /Moort/home/william) after resolving symlinks and cleaning the pathname. Are you symlinking an alternate home directory location to /home?

Using an alternate location for home directories can be related to the other problems you've been experiencing. If you're using an alternate location, could you try to bind-mount this alternate location on /home?

Reference: https://forum.snapcraft.io/t/how-can-i-use-snap-when-i-dont-use-home-user/3352/11

Changed in snapd:
status: New → Incomplete
Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
aPlatypus (william-full-moon) wrote :

If I understand things, the path

   /home/$USER

is not valid if /home is a symlink or when home directories are not on root. For example most corporate set-ups uses something like:

   /export/home/$USER

Sounds like that will foil the 'dumb smart software too.

I refute the proposition that ...

    "symlinking an alternate home directory location"

This is not an alternate. The semantics are straightforward: "/home/$USER/", it is a regular Unix path name.

The flaw here lies in the over-reach to resolve perfectly legitimate human use file paths into machnine talk. When in truth use of the given (legitimate) path of "/home/$USER" will or should work in all cases.

For comparison; I do not expect a compile error when the expression "i +=2;" isn't written as "i = i+2;" And that is more or less what has happened here. A correct file path is rejected because of some internal scruples that have not bearing on usability or function.

I'm not sure which part of the stack is dissatisfied with the "/home/$USER" pattern. If you know please post the module(s) if you'd like. It looks like snap-s can not be used at with this limitation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd (Ubuntu) because there has been no activity for 60 days.]

Changed in snapd (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd because there has been no activity for 60 days.]

Changed in snapd:
status: Incomplete → Expired
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.