[snap] "User installation could not be completed"

Bug #1702351 reported by modolo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Incomplete
Undecided
Unassigned
libreoffice (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This error occurs when the user group is composed of more than one word. My primary group is "domain users" since my user is in AD (I use SSSD).

LANG=en_US snap run libreoffice
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

$ snap info --verbose libreoffice core

name: libreoffice
summary: "LibreOffice is a powerful office suite including word processing and creation of spreadsheets, slideshows and databases"
publisher: canonical
contact: http://www.libreoffice.org/get-help/community-support/
description: |
  LibreOffice is a powerful office suite – its clean interface and
  feature-rich tools help you unleash your creativity and enhance your
  productivity. LibreOffice includes several applications that make it the most
  powerful Free and Open Source office suite on the market: Writer (word
  processing), Calc (spreadsheets), Impress (presentations), Draw (vector
  graphics and flowcharts), Base (databases), and Math (formula editing).
commands:
  - libreoffice.base
  - libreoffice.calc
  - libreoffice.draw
  - libreoffice.impress
  - libreoffice
  - libreoffice.math
  - libreoffice.writer
notes:
  private: false
  confinement: strict
  devmode: false
  jailmode: false
  trymode: false
  enabled: true
  broken: false
tracking: beta
installed: 5.3.4.2 (21) 368MB
refreshed: 2017-07-01 14:14:41 -0300 BRT
channels:
  stable: 5.3.2.2 (19) 375MB -
  candidate: 5.3.2.2 (19) 375MB -
  beta: 5.3.4.2 (21) 368MB -
  edge: 5.3.2.2 (19) 375MB -
---
name: core
summary: "snapd runtime environment"
publisher: canonical
contact: <email address hidden>
description: |
  The core runtime environment for snapd
type: core
notes:
  private: false
  confinement: strict
  devmode: false
  jailmode: false
  trymode: false
  enabled: true
  broken: false
tracking: stable
installed: 16-2 (2312) 83MB
refreshed: 2017-04-11 09:28:54 -0300 BRT
channels:
  stable: 16-2 (2312) 83MB -
  candidate: 16-2 (2312) 83MB -
  beta: 16-2 (2312) 83MB -
  edge: 16-2.26.7 (2317) 84MB -

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

Thank you for your bug report, you wrote "This error occurs" in the description but it looks like you didn't include the actual error?

Revision history for this message
modolo (modolo) wrote :

Pardon!

The error happens after the installation (which does not show errors), at the time that I will run the application. When I try to run the application comk the command '$ LANG = en_US snap run libreoffice' receives a window with the message below:

'The application can not be started.
'User installation could not be completed'

I am attaching an image with the error window.

I also get the message on the console:

(soffice:12842): Gtk-WARNING **: Failed to parse /home/modolo/snap/libreoffice/21/.config/gtk-3.0/settings.ini: Permission denied

But the permissions are correct!

modolo@gsat019046:~$ ls -l /home/modolo/snap/libreoffice/21/.config/gtk-3.0/settings.ini
lrwxrwxrwx 1 modolo domain users 41 Jul 4 17:38 /home/modolo/snap/libreoffice/21/.config/gtk-3.0/settings.ini -> /home/modolo/.config/gtk-3.0/settings.ini
modolo@gsat019046:~$ ls -l /home/modolo/.config/gtk-3.0/settings.ini
-rw-r--r-- 1 modolo domain users 47 Abr 10 19:27 /home/modolo/.config/gtk-3.0/settings.ini

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the report modolo. May I ask how you create a group with a name that has whitespaces?
I tried `sudo addgroup --force-badname "domain users"` but this bails out, refusing to create the group.

Changed in libreoffice (Ubuntu):
status: New → Incomplete
Revision history for this message
modolo (modolo) wrote :

I believe it is not possible to create local groups with words separated by spaces!

$ LANG=en_US sudo groupadd 'new group'
groupadd: 'new group' is not a valid group name

The 'domain users' group exists in my case because it is mapped from Active Directory by the SSS service.

If I log into my machine with a local user and run the command "snap run libreoffice" no error occurs.

I tested it with the local user modolo-user!

$ id modolo-user
uid=1000(modolo-user) gid=1000(modolo-user) grupos=1000(modolo-user),4(adm),7(lp),24(cdrom),27(sudo),30(dip),44(video),46(plugdev),113(lpadmin),128(sambashare),131(lxd),138(libvirtd)

I must be an isolated case! Probably no one tested snaps on a machine in the domain!

Thanks

Revision history for this message
Olivier Tilloy (osomon) wrote :

Interesting. Are you able to install and run other snaps in that setup, or do they all fail with the same error message?

Revision history for this message
modolo (modolo) wrote :

Hi!

I have a lot of snaps!

modolo@gsat019046:~$ snap list
Name Version Rev Developer Notes
core 16-2 2312 canonical -
emoj 0.3.0 1 popey -
hello-world 6.3 27 canonical -
libreoffice 5.3.4.2 21 canonical -
ohmygiraffe 1.1.0a 3 popey -
planetlander 1.0 2 fernando-j-scherf -
termius-app 1.0.8 6 crystalnix -

Apparently, the problem is only with libreoffice!
I've attached an image of the emoj snap working!

This problem with libreoffice is already old, I already posted this bug for some time but did not get an answer.

Thanks,
Marcelo Módolo

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the feedback Marcelo. Does libreoffice from the ubuntu repositories (not the snap package) work well in that setup?

Revision history for this message
modolo (modolo) wrote :

Libreoffice works very well from repositories!

Revision history for this message
modolo (modolo) wrote :

To make everything more complicated ...

I found a parameter in the config of the sssd service that allows replacing whitespace with another character:

[sssd]
...
override_space = _

As a result, my primary group changed to domain_users. Unfortunately, the error persists!

Revision history for this message
modolo (modolo) wrote :

Hi!

I tested the command 'snap run --shell libreoffice' and checked several names resolution errors for groups and users! Only local groups can be resolved.

Now I'm sure the problem is in the information returned to the groups and usernames.

I believe it must be something with the Name Service Switch configuration (/etc/nsswitch.conf).

...
groups: cannot find name for group ID 265665886
groups: cannot find name for group ID 265665887
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

I have no name!@gsat019046:/home/modolo$

I have no name!@gsat019046:/home/modolo$ ls -l
total 103880
-rw-r--r-- 1 265601806 265600513 1390 Mar 23 12:11 Builtin Object Token-Go Daddy Root Certificate Authority - G2-root
drwxr-xr-x 7 265601806 265600513 4096 Jul 26 2016 Compartilhamento
-rw-r--r-- 1 265601806 265600513 15592 Jun 27 18:38 CoreOS_Image_Signing_Key.asc
drwxr-xr-x 42 265601806 265600513 4096 May 29 15:52 Desenvolvimento
drwxr-xr-x 45 265601806 265600513 12288 Jul 7 12:54 Documentos
...

I have no name!@gsat019046:/home/modolo$ id
uid=265601806 gid=265600513 groups=265600513,4(adm),7(lp),24(cdrom),27(sudo),30(dip),44(video),46(plugdev),113(lpadmin),128(sambashare),131(lxd),137(kvm),138(libvirtd),997(rkt),265602411,265602421,265604408,265604415,265609914,265613528,265614005,265619450,265619467,265619643,265619720,265619721,265626944,265626955,265629586,265630854,265632970,265632975,265632993,265633732,265633737,265636639,265636643,265636657,265636659,265636673,265637680,265638362,265639476,265639496,265641502,265641854,265641855,265643223,265643255,265643431,265645967,265646099,265646372,265646461,265646560,265646775,265646882,265647071,265651567,265651622,265653636,265653673,265653733,265653757,265653855,265654408,265654550,265654552,265654561,265654890,265656369,265656370,265656371,265656375,265656378,265656379,265656380,265656382,265656384,265656386,265656388,265656390,265657145,265658322,265659423,265659533,265659589,265660036,265660834,265661748,265662107,265662110,265662117,265662118,265662131,265662136,265662139,265662143,265662145,265662543,265662739,265662740,265664437,265664505,265664999,265665490,265665669,265665758,265665833,265665886,265665887

Olivier Tilloy (osomon)
Changed in libreoffice (Ubuntu):
status: Incomplete → New
summary: - User installation could not be completed
+ [snap] "User installation could not be completed"
Revision history for this message
modolo (modolo) wrote :

Hi,

I confirmed the problem with a simpler application, "hello-world".
Modolo @ gsat019046: ~ $ snap run --shell hello-world
...

I have no name! @ Gsat019046: / home / modolo $ getent passwd modolo
--> No output! <--

I have no name! @ Gsat019046: / home / modolo $ getent passwd tomcat
Tomcat: x: 1001: 1001 :: / opt / tomcat: / usr / sbin / nologin

I have no name! @ Gsat019046: / home / modolo $ getent passwd root
Root: x: 0: 0: root: / root: / bin / bash

Name resolution (groups and users) does not work inside confinement for non-local users - who use the SSS service.

Thans

Revision history for this message
Olivier Tilloy (osomon) wrote :

So that looks like a more general problem, which potentially affects other snaps, not just libreoffice.

Tentatively adding a snapd task.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hey.

Can you check if this is still affecting your system?
In addition, can you please share your /etc/nsswitch.conf

Changed in snapd:
status: New → Confirmed
status: Confirmed → Incomplete
Revision history for this message
modolo (modolo) wrote :

Hi!

Working without errors!

sudo snap install libreoffice
libreoffice 6.0.3.2 from 'canonical' installed

sudo snap list
Name Version Rev Tracking Developer Notes
cointop e0fc5b3 37 stable miguelmota -
core 16-2.32.6 4571 stable canonical core
libreoffice 6.0.3.2 59 stable canonical -
tizonia 0.14.0 155 stable tizonia -

snap run libreoffice
Traceback (most recent call last):
  File "/snap/libreoffice/59/javasettings.py", line 41, in <module>
    java_output).group("version")
AttributeError: 'NoneType' object has no attribute 'group'
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"

Thanks,
Marcelo Módolo

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the feedback Marcelo.
The python traceback ("AttributeError: 'NoneType' object has no attribute 'group'") is unexpected, may I ask you to share the output of the following command:

    /snap/libreoffice/current/usr/lib/jvm/java-8-openjdk-*/jre/bin/java -version

Thanks!

Revision history for this message
modolo (modolo) wrote :

Hi Olivier!

/snap/libreoffice/current/usr/lib/jvm/java-8-openjdk-*/jre/bin/java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

Thanks,
Marcelo Módolo

Revision history for this message
Olivier Tilloy (osomon) wrote :

That looks correct.

If you run libreoffice from a terminal again ("snap run libreoffice"), is the traceback printed again?

Can you share the output of the following command?

    cat $HOME/snap/libreoffice/current/.config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml

Revision history for this message
modolo (modolo) wrote :

Olivier,

The only messages on the console were the two lines Gtk-Message *

$ snap run libreoffice
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"

Follow the output:
$ cat $HOME/snap/libreoffice/current/.config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--This is a generated file. Do not alter this file!-->
<java xmlns="http://openoffice.org/2004/java/framework/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<enabled xsi:nil="true"></enabled>
<userClassPath xsi:nil="true"></userClassPath>
<vmParameters xsi:nil="true"></vmParameters>
<jreLocations xsi:nil="true"></jreLocations>
<javaInfo xsi:nil="true"></javaInfo>
</java>

Thanks,
Marcelo Módolo

Revision history for this message
Olivier Tilloy (osomon) wrote :

Okay, so it looks like the traceback might have been a one-off.

If you remove the settings file and run libreoffice again, do you get the traceback again?

    rm $HOME/snap/libreoffice/current/.config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml
    snap run libreoffice

Revision history for this message
modolo (modolo) wrote :

After rm...

snap run libreoffice
Traceback (most recent call last):
  File "/snap/libreoffice/59/javasettings.py", line 41, in <module>
    java_output).group("version")
AttributeError: 'NoneType' object has no attribute 'group'
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"

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.