← Back to issue list

`SNAPCRAFT_UA_TOKEN` does not work on `base: core24`

View original Github issue

Metadata

Project
snapcraft
Number
#6140
Type
issue
State
open
Author
dilyn-corner
Labels
Status: Triaged Type: Bug
Created
2026-03-30 18:30:15+00:00
Updated
2026-03-31 12:37:01+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description Describe the bug, including any relevant context or screenshots. When attempting to perform a build of a snap and setting `SNAPCRAFT_UA_TOKEN=<token>` to use any available ESM packages via an Ubuntu Pro subscription, the managed build environment never becomes pro-attached and as such the ESM archive is not available for fetching build or stage packages. A few workarounds may exist, including -- 1) Something the [ROS folx do](https://github.com/canonical/ros-content-sharing-snaps/blob/main/.github/workflows/monthly-builds-esm.yaml#L73-L124) in their CI 2) Pro-attaching the host LXD via [this](https://documentation.ubuntu.com/lxd/stable-5.21/howto/instances_ubuntu_pro_attach/) 3) Managing my own container and manually pro-attaching it, then building snaps there with `--destructive-mode` ### Steps to reproduce Provide step-by-step instructions to reproduce the bug. - Install snapcraft 8.x (tested on latest/edge) - Set `SNAPCRAFT_PRO_TOKEN=<token>` to a token available to you on ubuntu.com/pro - Attempt to build a snap with `snapcraft pack --use-lxd` Notice that no Pro attachment or entitlement messages appear in the build log, `pro` is not available in the container, and no ESM archives are added to a sources file. ### Environment Snapcraft 8.x on Ubuntu 25.10, building with `--use-lxd`. Reproduced on a variety of other environments, including CI. ### snapcraft.yaml This issue is not snap specific; the boilerplate would be sufficient. ### Log output ```shell dilyn …/core-nas/immich  24 $?  pro status No Ubuntu Pro services are available to this system. For a list of all Ubuntu Pro services, run 'pro status --all' Enable services with: pro enable <service> Account: dilyn.corner@canonical.com Subscription: Ubuntu Pro - free personal subscription dilyn …/core-nas/immich  24 $?  echo $SNAPCRAFT_UA_TOKEN xxx dilyn …/core-nas/immich  24 $? 2s  snapcraft pack --use-lxd Starting snapcraft, version 8.14.4 Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20260330-143313.446827.log' Launching managed ubuntu 24.04 instance... Creating new instance from remote Creating new base instance from remote Creating new instance from base instance Starting instance Starting snapcraft, version 8.14.4 Logging execution to '/tmp/snapcraft.log' Refreshing repositories Package repositories installed Initializing lifecycle Installing build-packages Interrupted. Failed to run snapcraft in instance Full execution log: '/home/dilyn/.local/state/snapcraft/log/snapcraft-20260330-143313.446827.log' ⏎ ``` Compared to a working attempt (`base: core22`): ```shell dilyn …/core-nas/immich  22 $!?  snapcraft pack --use-lxd Starting snapcraft, version 8.14.4 Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20260330-143440.559838.log' Skipping build-on: arm64 build-for: ['arm64'] because build-on doesn't match host arch: amd64 Running on amd64 for amd64 '--enable-manifest' is deprecated, and will be removed in core24. Launching instance... Starting instance Starting snapcraft, version 8.14.4 Logging execution to '/tmp/snapcraft.log' Skipping build-on: arm64 build-for: ['arm64'] because build-on doesn't match host arch: amd64 Running on amd64 for amd64 Initializing parts lifecycle Attaching specified UA token... Attach UA token :: Enabling Ubuntu Pro: ESM Apps :: Ubuntu Pro: ESM Apps enabled :: Enabling Ubuntu Pro: ESM Infra :: Ubuntu Pro: ESM Infra enabled :: This machine is now attached to 'Ubuntu Pro - free personal subscription' :: :: SERVICE ENTITLED STATUS DESCRIPTION :: anbox-cloud yes disabled Scalable Android in the cloud :: esm-apps yes enabled Expanded Security Maintenance for Applications :: esm-infra yes enabled Expanded Security Maintenance for Infrastructure :: fips-preview yes disabled Preview of FIPS crypto packages undergoing certification with NIST :: fips-updates yes disabled FIPS compliant crypto packages with stable security updates :: usg yes disabled Security compliance and audit tools :: :: NOTICES :: Operation in progress: pro attach :: :: For a list of all Ubuntu Pro services, run 'pro status --all' :: Enable services with: pro enable <service> :: :: Account: dilyn.corner@canonical.com :: Subscription: Ubuntu Pro - free personal subscription Attached specified UA token Installing package repositories... ```

Evaluation history

No evaluation history available.