Snapcraft 7 fails to launch a LXD container based on host apt sources entries
Metadata
Current evaluation
Closed as a duplicate of canonical/snapcraft#4408; no separate fix was made for this report.
Resolution: closed superseded
Reason: Maintainer mr-cal closed it as a duplicate of #4408 on 2025-04-24. That issue remains the canonical tracker for the Snapcraft 7.5/core20 LXD failure involving inline deb822 Signed-By keys.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
When using Snapcraft 7 to create core18 snaps, snapcraft fails to parse fingerprints in apt sources entries.
### To Reproduce
`snapcraft --use-lxd`
### Environment
Snapcraft 7.5
### snapcraft.yaml
```yaml
name: hello-core20
base: core20
version: '0.1'
summary: hello
description: hello
grade: devel
confinement: devmode
parts:
my-part:
plugin: nil
```
### Relevant log output
```shell
> snapcraft --use-lxd
Sorry, an error occurred in Snapcraft:
E:Invalid value set for option Signed-By regarding source https://ppa.launchpadcontent.net/ubuntu-enterprise-desktop/authd/ubuntu/ noble (not a fingerprint), E:The list of sources could not be read.
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: view
Traceback (most recent call last):
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/cli.py", line 256, in run
_run_dispatcher(dispatcher, global_args)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/cli.py", line 229, in _run_dispatcher
dispatcher.run()
File "/snap/snapcraft/13058/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run
return self._loaded_command.run(self._parsed_command_args)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 265, in run
super().run(parsed_args)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 179, in run
yaml_data = process_yaml(snap_project.project_file)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 142, in process_yaml
yaml_data = yaml_utils.load(yaml_file)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/parts/yaml_utils.py", line 94, in load
raise errors.LegacyFallback(f"base is {build_base}")
snapcraft.errors.LegacyFallback: base is core20
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/legacy.py", line 27, in legacy_run
run()
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1666, in invoke
rv = super().invoke(ctx)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/_runner.py", line 139, in run
snap_command.invoke(ctx)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 405, in snap
_execute(steps.PRIME, parts=tuple(), pack_project=True, output=output, **kwargs)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 141, in _execute
build_provider_class.ensure_provider()
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py", line 90, in ensure_provider
if repo.Repo.is_package_installed("lxd") or repo.Repo.is_package_installed(
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/internal/repo/_deb.py", line 535, in is_package_installed
with AptCache() as apt_cache:
File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/internal/repo/apt_cache.py", line 58, in __enter__
self.cache = apt.Cache()
File "/snap/snapcraft/13058/lib/python3.8/site-packages/apt/cache.py", line 170, in __init__
self.open(progress)
File "/snap/snapcraft/13058/lib/python3.8/site-packages/apt/cache.py", line 232, in open
self._cache = apt_pkg.Cache(progress)
apt_pkg.Error: E:Invalid value set for option Signed-By regarding source https://ppa.launchpadcontent.net/ubuntu-enterprise-desktop/authd/ubuntu/ noble (not a fingerprint), E:The list of sources could not be read.
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]:
```
### Additional context
The apt sources file has a fingerprint for the signed-by key:
```
Types: deb
URIs: https://ppa.launchpadcontent.net/ubuntu-enterprise-desktop/authd/ubuntu/
Suites: noble
Components: main
Signed-By: -----BEGIN PGP PUBLIC KEY BLOCK-----
.
mQINBGXcujkBEADFF4e0Xj0pyPe6h4E2VNX1rRvja88iVJm9zO54vWfvloA3JRfQ
...
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed as a duplicate of canonical/snapcraft#4408; no separate fix was made for this report. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed by maintainer mr-cal on 2025-04-24 as a duplicate of canonical/snapcraft#4408 (same Snapcraft 7.5 core20 LXD/apt deb822 Signed-By failure, tracked as SNAPCRAFT-1042). No separate fix was made here. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed as a duplicate of canonical/snapcraft#4408, which tracks the same Snapcraft 7.5 LXD/core20 failure on inline deb822 Signed-By key blocks. No separate fix was made for this report. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as a duplicate of #4408. Snapcraft 7 fails to parse PGP fingerprints in host apt sources when launching LXD containers, triggering an apt_pkg.Error. Resolution is tracked in the referenced duplicate. | |
| qwen/qwen3.6-35b-a3b | — | — | Reported Snapcraft 7 LXD container launch failures due to apt source fingerprint parsing errors were closed as a duplicate of issue #4408. The report was superseded without direct resolution. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as a duplicate of #4408. Snapcraft 7 fails to parse PGP fingerprints in host apt sources when launching LXD containers, triggering an apt_pkg.Error. Resolution is tracked in the referenced issue. |
Update history
No update history recorded yet.
Related work
-
Duplicate Of:
canonical/snapcraft#4408
(confidence 100%)
The maintainer explicitly identified #4408 as the duplicate covering the same failure.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1750642 Snapcraft fails in LXD container on Debian 9 | snapcraft (launchpad) | closed | Closed as stale in September 2026 because Debian 9 and the reported Snapcraft version were outdated; no fixing PR or commit was identified. | |
| #1985409 snapcraft-managed lxd containers do not respect parallel installs | snapcraft (launchpad) | closed | Reported 2022 that parallel-installed snapcraft instances (e.g. snapcraft_7) launch the unsuffixed host snapcraft inside their managed LXD build container, causing '--build-for' build failures. Closed in 2026 after PR #5085 and 7.5 backport #5087. | |
| #1999321 Snapcraft is stuck on "launching instance..." indefinitely | snapcraft (launchpad) | open | Endless LXD startup on failed container DNS now times out via craft-providers; Snapcraft 7.5.4 is recorded as fixing the wait. Multipass arm64 and Docker diagnostics remain separately tracked. | |
| #1992213 Snapcraft crashes when the APT unprivileged user owns the host's source list file instead of root | snapcraft (launchpad) | open | Snapcraft 8187 crashed opening a 0600 _apt-owned APT metadata file. The legacy LXD path was removed, but equivalent current apt-cache checks still need review. | |
| #719 Snapcraft fails initialization of build container | craft-providers | closed | LXD startup race was fixed by waiting for instance readiness in craft-providers PR #720; the fix shipped via Snapcraft PR #5247 in Snapcraft 8.6.2. | |
| #1746612 Snapcraft cleanbuild doesn't work if you're not using the LXD snap | snapcraft (launchpad) | closed | Closed after the missing hostfs behavior was fixed upstream in lxc/lxd#4183. Snapcraft PR #1912 offered a workaround but was not merged. | |
| #1839399 snapcraft not pulling snap from lxd container | snapcraft (launchpad) | open | Snapcraft 3.7.1 reported a successful --use-lxd build but left the generated snap absent on the host; a maintainer identified possible CWD handling, and the case remains unresolved. | |
| #1795827 Snapcraft doesn't install snapcraft inside the lxd container | snapcraft (launchpad) | open | Historical LXD builds failed because Snapcraft was not injected into the container; the modern Craft Providers LXD path injects Snapcraft and resolves the legacy failure. | |
| #1666735 snapcraft cleanbuild does not work with lxd installed via snap | snapcraft (launchpad) | closed | Fixed by merged canonical/snapcraft#1199 (commit 417989880), making cleanbuild LXD detection packaging-independent instead of relying on apt package metadata. | |
| #1907721 Snapcraft broken on ARM64 | snapcraft (launchpad) | closed | Closed as a configuration issue: a system-wide Python package broke apt-installed Snapcraft, while Multipass lacked ARM64 support; maintainers recommended the Snapcraft snap and --use-lxd. |