[snap] chromium-driver fails to create .cache/desktop-runtime-date on first run

Bug #2097403 reported by Matthew Ruffell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Fix Committed
Undecided
Sergio Costas

Bug Description

[Impact]

Autopkgtests that rely on chromium-driver apt dependency fail due to the following error being printed to stderr during runtime:

touch: cannot touch '/home/ubuntu/snap/chromium/common/.cache/desktop-runtime-date': No such file or directory

Affected packages are phpldapadmin for example:

https://autopkgtest.ubuntu.com/packages/p/phpldapadmin/oracular/amd64

[Testcase]

$ sudo snap install chromium
$ chromedriver
touch: cannot touch '/home/ubuntu/snap/chromium/common/.cache/desktop-runtime-date': No such file or directory
...

Revision history for this message
Matthew Ruffell (mruffell) wrote :

The root cause is the following commit:

https://github.com/canonical/snapcraft-desktop-integration/pull/30/commits/19c397275516a3995e95fbc5c8ef49a85df0b758

We need to check if $SNAP_USER_COMMON/.cache exists first.

no longer affects: chromium-browser (Ubuntu)
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :
Changed in snapd (Ubuntu):
status: New → In Progress
assignee: nobody → Sergio Costas (rastersoft-gmail)
Changed in snapd (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Patch merged.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Hi Sergio,

I forgot to ask, is this a part of snapd, and we need a new snapd release, or is this a part of build-time of snap packages and we need e.g. a new chromium snap with a fixed snapcraft version?

Thanks

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

It is part of snapcraft, and the script is added to the chromium snap (to be precise, it is added to any snap that uses the gnome-XX-YYYY extension). So you need a new chromium snap with the fixed snapcraft.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Ok, I was mistaken: it is part of the Gnome-XX-YYYY itself, and doesn't depend on snapcraft. So a rebuild of that snap should fix it, without having to create a new snap for chromium.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote (last edit ):

Ops... sorry, wrong project.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

The fix is merged as:

commit 50c1ae4d7177d5357d63a71f103e570c242ce0c1
From: Sergio Costas <email address hidden>
Date: Mon, 10 Feb 2025 10:42:51 +0100
Subject: Ensure the .cache folder exists (#31)
Link: https://github.com/canonical/snapcraft-desktop-integration/commit/50c1ae4d7177d5357d63a71f103e570c242ce0c1

We are waiting for gnome-42-2204 snap to be refreshed with the fix:

https://github.com/ubuntu/gnome-sdk/issues/280

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.