[snap] configure hook fails because the gnome-3-28-1804 platform snap isn't connected

Bug #1915712 reported by Joel Linn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Olivier Tilloy
chromium-browser (Ubuntu)
Incomplete
Undecided
Unassigned
snapcraft (Ubuntu)
Fix Released
Medium
Olivier Tilloy
snapd (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

happened on do-release-upgrade

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: chromium-browser 87.0.4280.66-0ubuntu0.18.04.1
ProcVersionSignature: Ubuntu 4.15.0-135.139-generic 4.15.18
Uname: Linux 4.15.0-135-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.23
Architecture: amd64
DRM.card0-DP-1:
 enabled: disabled
 dpms: Off
 status: disconnected
 edid-base64:
 modes:
DRM.card0-HDMI-A-1:
 enabled: disabled
 dpms: Off
 status: disconnected
 edid-base64:
 modes:
DRM.card0-VGA-1:
 enabled: enabled
 dpms: On
 status: connected
 edid-base64: AP///////wAEcmOt9h4RchURAQMIJh546JrlplhJmSMRUFS/7wABAQEBAQEBAQEBAQEBAQEBMCoAmFEAKkAwcBMAeC0RAAAeAAAA/QA4Sx5TDgAKICAgICAgAAAA/wBMNzgwQzA1NDQwNDQKAAAA/ABBTDE5MTYKICAgICAgAGE=
 modes: 1280x1024 1280x1024 1024x768 1024x768 1024x768 832x624 800x600 800x600 800x600 800x600 640x480 640x480 640x480 640x480 720x400
Date: Mon Feb 15 13:26:20 2021
Desktop-Session:
 'None'
 'None'
 '/usr/local/share:/usr/share:/var/lib/snapd/desktop'
Env:
 'None'
 'None'
ErrorMessage: »neues chromium-browser-Skript des Paketes pre-installation«-Unterprozess gab den Fehlerwert 1 zurück
InstallationDate: Installed on 2017-06-27 (1328 days ago)
InstallationMedia: Kubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215)
InstalledPlugins:

Load-Avg-1min: 0.61
Load-Processes-Running-Percent: 0.2%
MachineType: Hewlett-Packard HP Pro3500 Series
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-135-generic root=UUID=093e88ea-7b5e-4e39-b56c-03b28ad06dd2 ro quiet splash vt.handoff=1
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
SourcePackage: chromium-browser
Title: package chromium-browser 87.0.4280.66-0ubuntu0.18.04.1 failed to install/upgrade: »neues chromium-browser-Skript des Paketes pre-installation«-Unterprozess gab den Fehlerwert 1 zurück
UpgradeStatus: Upgraded to focal on 2021-02-15 (0 days ago)
dmi.bios.date: 10/25/2013
dmi.bios.vendor: AMI
dmi.bios.version: 8.17
dmi.board.name: 2ABF
dmi.board.vendor: Foxconn
dmi.board.version: 3.20
dmi.chassis.asset.tag: CZC34935PY
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnAMI:bvr8.17:bd10/25/2013:svnHewlett-Packard:pnHPPro3500Series:pvr:rvnFoxconn:rn2ABF:rvr3.20:cvnHewlett-Packard:ct3:cvr:
dmi.product.family: 103C_53307F G=D
dmi.product.name: HP Pro3500 Series
dmi.sys.vendor: Hewlett-Packard
modified.conffile..etc.default.chromium-browser: [deleted]

Revision history for this message
Joel Linn (jl-o) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Relevant error from DpkgTerminalLog.txt:

Fehler: cannot perform the following tasks:
- Den Konfigurationshook von Snap "chromium" ausführen, falls vorhanden (run hook "configure": /snap/chromium/1479/snap/command-chain/hooks-configure-desktop: line 43: /snap/chromium/1479/gnome-platform/usr/bin/fc-cache: No such file or directory)

This suggests that the gnome-3-28-1804 platform snap wasn't installed/connected at the time the configure hook was run.

Can you try running the following command, and let us know how this goes (share the output here if it goes awry):

    sudo apt reinstall chromium-browser

Changed in chromium-browser (Ubuntu):
status: New → Incomplete
tags: added: snap
summary: - migrating to chromium snap broken 18.04->20.04
+ [snap] configure hook fails because the gnome-3-28-1804 platform snap
+ isn't connected
Revision history for this message
Olivier Tilloy (osomon) wrote :

I added a snapd task, in case there's a potential for race conditions regarding when configure hooks are run.

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Hi, @jl-o, on your system can you run in a terminal and share the output:

journalctl --no-pager -u snapd
snap changes
for err in $(snap changes | grep Error | awk '{print $1}'); do snap tasks $err; done

Thanks

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Olivier Tilloy (osomon) wrote :

I'd recommend running what Ian suggested first, before attempting the reinstall that I suggested. This might give valuable information as to what the problem is.

Revision history for this message
Stanislav Bocinec (svacko) wrote :

I'm experiencing the same error on Ubuntu 20.04, that started to occur suddenly a few months ago (don't have the version numbers). Since then I was not able to update chromium, nor able to install it after remove & purge as it fails with the reported error:
```
# snap install chromium
error: cannot perform the following tasks:
- Run configure hook of "chromium" snap if present (run hook "configure": /snap/chromium/1479/snap/command-chain/hooks-configure-desktop: line 43: /snap/chromium/1479/gnome-platform/usr/bin/fc-cache: No such file or directory)
```

It seems to be an issue with `font-cache` not being properly mounted from the host as you can read here https://forum.snapcraft.io/t/default-chromium-fonts-are-missing-after-snapd-has-been-updated/21651/7.

The issue seems to be fixed in snapd upstream https://github.com/snapcore/snapd/pull/9805 though not sure if and when will this land in ubuntu.

Attaching the `snap changes` error output.

Revision history for this message
Stanislav Bocinec (svacko) wrote :

So after further troubleshooting I found what was issue in my case - having `gnome-3-28-1804` snap installed, but disabled.

After enabling it, `snap install chromium` now succeeds.

For the reference adding list of the related installed snaps:
```
$ snap list |egrep '(gnome|core|chromium|gtk)'
chromium 88.0.4324.150 1479 latest/stable canonical* -
core 16-2.48.2.1 10823 latest/stable canonical* core
core18 20210128 1988 latest/stable canonical* base
core20 20201210 904 latest/stable canonical* base
gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 145 latest/stable canonical* -
gnome-3-34-1804 0+git.3556cb3 66 latest/stable canonical* -
gnome-calculator 3.38.0+git7.c840c69c 826 latest/stable/… canonical* -
gnome-characters v3.34.0+git9.eeab5f2 570 latest/stable/… canonical* -
gnome-logs 3.36.0 103 latest/stable/… canonical* -
gnome-system-monitor 3.38.0-17-g38c1ce1d62 157 latest/stable/… canonical* -
gtk-common-themes 0.1-50-gf7627e4 1514 latest/stable/… canonical* -
gtk2-common-themes 0.1 13 latest/stable canonical* -
```

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

Interesting, thanks for this Stanislav.

Ian, do you think snapd could/should warn the user when a snap requests connection to a content snap that is installed but disabled?

Revision history for this message
Ian Johnson (anonymouse67) wrote :

I don't think we could/should warn because we don't know for sure which content slot should be used, just because the default-provider is disabled doesn't mean that the user isn't trying to use some other provider of the content interface.

We could maybe expose some additional property on interface slots which forces a warning to be exposed, but that would be a fair amount of work.

What would be easier and more preferable I think (that would also benefit more snaps) is to update the extension hook that is being used here to use `snapctl is-connected ...` on all the content interface plugs that should be coming from the platform snaps, that code if put into upstream snapcraft would benefit all snaps built with the extension that presumably all require using a platform snap.

Revision history for this message
Ian Johnson (anonymouse67) wrote :

I think also that this means we should always ask for `snap list --all` output when debugging these sorts of issues.

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

That makes sense, thanks Ian. I'm adding a snapcraft task to update the corresponding extension hooks to check for the connection before trying to use the content snap.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Olivier Tilloy (osomon)
Changed in snapcraft (Ubuntu):
status: New → In Progress
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
Revision history for this message
Joel Linn (jl-o) wrote :

I'm sorry but I'm afraid I can't help any further.
I needed the machine back in the office so I just removed the chromium-browser debs (as firefox is the destined browser anyways).
The machine originally had 16.04 installed and had an upgrade to 18.04 done in 2018, maybe there was some legacy stuff it stumbled over.

Changed in snapcraft:
importance: Undecided → Medium
assignee: nobody → Olivier Tilloy (osomon)
status: New → In Progress
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Olivier Tilloy (osomon)
Changed in snapcraft (Ubuntu):
status: In Progress → Fix Released
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.