Fresh install of chromium-browser during installer-like process, in a chroot fails (when preparing machines prior to first boot)

Bug #1882232 reported by Jo K on 2020-06-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Olivier Tilloy
Olivier Tilloy

Bug Description


Users trying to install chromium-browser with apt in a chroot will see the preinst script hang for 30min, and eventually fail.
This use case is important as chroots are used by sysadmins to prepare installers.

[Test Case]

Create a focal chroot (for example using "pcreate -a amd64 -d focal focal-amd64"), enter the chroot and run "apt install chromium-browser".
Expected outcome: the installation succeeds, even though the chromium snap is not being installed because snapd cannot run in the chroot.
Incorrect (current) outcome: the installation hangs during 30 minutes while trying to contact the snap store, and eventually fails.

[Regression Potential]

As this change modifies the chromium-browser preinstallation script, it should be verified that installing the package on systems that are capable of running snapd (e.g. virtual machines or bare metal) still works as expected.

[Original Description]

Since snapd integration, chromium-browser package fails to install in a post kickstart chroot.
As APT obfuscate snap installation, I worry about auto installation off any other snap package.

When a user is running the installer, and instructs to install chromium-browser with apt in the /target chroot the experience is extremely bad.

There are timeouts, there is critical debconf prompt, and no explanation as to what is happening.

This is not an upgrade, and no conversion from deb2snap is needed.

It is in a chroot, because this is how installers work.

It feels like as if on fresh install of chromium-browser it should try "snap install --now-or-schedule-for-later chromium-browser" such that if snapd is running and available install it now, otherwise record a task for snapd to execute if and when it comes up (on first boot). Or like for example, it should call snap prepare-image --classic instead.

Overall, imho on new installations of the package, if there is no snapd running, it should be skipped without asking any questions or popping up any dialogues.

Jo K (eoli3neoli3n) wrote :
Dimitri John Ledkov (xnox) wrote :

That's a debconf note. How did you invoke installation?

All package installation is interactive. If you want non-interactive package installation one has to pass options to apt to "do not disturb me" and accept defaults to any questions around installation or upgrades.

DEBIAN_FRONTEND=noninteractive chroot $MY_CHROOT apt-get -y install $packages

is the better way to install packages non-interactively. Does doing something like that sufficient to complete chromium-browser package installation?

Changed in chromium-browser (Ubuntu):
status: New → Incomplete
Jo K (eoli3neoli3n) wrote :

I did install with "apt install chromium-browser -y" for the demonstration.
In my specific case, i use ansible so it is non interactive.

That task fails.

- name: install browsers
    state: latest
      - firefox
      - firefox-locale-fr
      - chromium-browser
      - chromium-browser-l10n
      - adobe-flashplugin

Jo K (eoli3neoli3n) wrote :

To reproduce

apt install ansible -y
ansible localhost -m apt -a "name=chromium-browser"

You can try it in a container. That's not exactly a chroot but...

docker run --rm -it ubuntu:latest /bin/bash
apt update && apt install ansible -y
ansible localhost -m apt -a "name=chromium-browser"

Dimitri John Ledkov (xnox) wrote :

"-y" is not enough to install non-interactive under ansible.

Either specify debconf non-interactive frontened, or ask ansible to preseed the debconf answer that you acknowledge the debconf note that the package will provide.

Jo K (eoli3neoli3n) wrote :
Download full text (4.0 KiB)

Ansible use his own module to wrap apt command, and it uses non-interactive way, not just "-y".

Anyway i confirm that this fails under a chroot :

$ DEBIAN_FRONTEND=noninteractive chroot /target apt-get -y install chromium-browser
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  liblzo2-2 snapd squashfs-tools
Suggested packages:
  zenity | kdialog
The following NEW packages will be installed:
  chromium-browser liblzo2-2 snapd squashfs-tools
Preconfiguring packages ...
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/23.4 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Selecting previously unselected package liblzo2-2:amd64.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 72913 files and directories currently installed.)
Preparing to unpack .../liblzo2-2_2.10-2_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.10-2) ...
Selecting previously unselected package squashfs-tools.
Preparing to unpack .../squashfs-tools_1%3a4.4-1_amd64.deb ...
Unpacking squashfs-tools (1:4.4-1) ...
Selecting previously unselected package snapd.
Preparing to unpack .../snapd_2.44.3+20.04_amd64.deb ...
Unpacking snapd (2.44.3+20.04) ...
Setting up liblzo2-2:amd64 (2.10-2) ...
Setting up squashfs-tools (1:4.4-1) ...
Setting up snapd (2.44.3+20.04) ...
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.apparmor.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.autoimport.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.core-fixup.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.recovery-chooser-trigger.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.seeded.service.
Created symlink /etc/systemd/system/cloud-final.service.wants/snapd.seeded.service → /lib/systemd/system/snapd.seeded.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.snap-repair.timer.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.socket.
Created symlink /etc/systemd/system/ → /lib/systemd/system/snapd.system-shutdown.service.


Dimitri John Ledkov (xnox) wrote :

My debconf prompt is different and has options to retry abort skip, or press ok.

My screen is larger, is there a scrollbar that is not visible? can you scroll down to skip and press skip?

Alternatively, can you use debconf pressed to pressed the answer to the quesiton as Skip:

chromium-browser chromium-browser/snap-no-connectivity select Skip

summary: - install chromium-browser in a chroot fails
+ Fresh install of chromium-browser during installer-like process, in a
+ chroot fails (when preparing machines prior to first boot)
Dimitri John Ledkov (xnox) wrote :

We had a lot of conversations on IRC about this.

tl;dr overall, the UX is bad and confusing and must be improved.

description: updated
Changed in chromium-browser (Ubuntu):
status: Incomplete → Confirmed
tags: added: rls-gg-incoming
Dimitri John Ledkov (xnox) wrote :

In lxd deb2snap we have this:

        # Check store connectivity
        echo "==> Checking connectivity with the snap store"
        while :; do
            if skip_unusable_snapd; then
                echo "===> System doesn't have a working snapd and LXD was never used, skipping"

similar does not exist in chromium-browser, but must.

Olivier Tilloy (osomon) wrote :

That code is pretty new in the lxd deb2snap, it was added with I'll test and replicate in the chromium deb2snap.

Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Olivier Tilloy (osomon)
Olivier Tilloy (osomon) wrote :
Changed in chromium-browser (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package chromium-browser - 83.0.4103.97-0ubuntu1

chromium-browser (83.0.4103.97-0ubuntu1) groovy; urgency=medium

  * New upstream release: 83.0.4103.97
  * Do not attempt to install the snap on systems where snapd isn't running
    (including chroots and WSL) (LP: #1882232)

 -- Olivier Tilloy <email address hidden> Mon, 08 Jun 2020 17:49:24 +0200

Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
Olivier Tilloy (osomon) on 2020-06-08
Changed in chromium-browser (Ubuntu Focal):
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
status: New → In Progress
Olivier Tilloy (osomon) on 2020-06-08
description: updated

Hello Jo, or anyone else affected,

Accepted chromium-browser into focal-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in chromium-browser (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Jo K (eoli3neoli3n) wrote :

Just tried with -proposed repo, installation of chromium-browser package doesn't hang in a chroot anymore.
After first reboot the package is installed in version: 83.0.4103.97-0ubuntu0.20.04.1

Please change tag from verification-needed-focal to verification-done-focal.

Jo K (eoli3neoli3n) wrote :


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium

when should it trigger snap installation ?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers