Snapd error `cannot set "core.experimental.snapd-snap"` when repacking a core20 snap
Metadata
Current evaluation
Fixed in Snapcraft 8.12. The failure resulted from snapd 2.68.4 removing the core.experimental.snapd-snap flag. Snapcraft now conditionally applies the flag based on the snapd version, resolving the build error for core20 and core18 environments.
Suggested action: —
No scores available.
Issue body
### Bug Description
When building a core18 snap, the second run errors out. It works for a single build again after cleaning
### To Reproduce
1. Clone a core18 snap
2. `snapcraft --use-lxd`
3. `snapcraft --use-lxd`
### Environment
Kubuntu 25.04
### snapcraft.yaml
```yaml
name: git-nuke
base: core18
version: '0.1'
summary: The best thing since sliced bread
description: |
Too many branches? NOT ANY MORE!
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: classic # use 'strict' once you have the right plugs and slots
parts:
my-part:
plugin: dump
source: .
apps:
git-nuke:
command: /snap/core18/current/usr/bin/python3 $SNAP/git-nuke
```
### Relevant log output
```shell
$ snapcraft_7 --use-lxd
Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
error: cannot perform the following tasks:
- Run configure hook of "core" snap (run hook "configure": cannot set "core.experimental.snapd-snap": unsupported system option)
An error occurred when trying to execute 'snap set system experimental.snapd-snap=true' with 'LXD': returned exit code 1.
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Fixed in Snapcraft 8.12. The failure resulted from snapd 2.68.4 removing the core.experimental.snapd-snap flag. Snapcraft now conditionally applies the flag based on the snapd version, resolving the build error for core20 and core18 environments. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in Snapcraft 8.12. Snapd 2.68.4 removed the core.experimental.snapd-snap option, causing build failures. Snapcraft now conditionally sets the flag based on the snapd version, resolving the issue for core20 and core18 builds. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in Snapcraft 8.12. The build now conditionally sets the core.experimental.snapd-snap flag only when snapd is below version 2.68.4, resolving the unsupported system option error. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in Snapcraft 8.12. Snapd 2.68.4 removed the core.experimental.snapd-snap config, triggering the error. Snapcraft now checks the snapd version and conditionally applies the flag to prevent build failures. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5693 Snapd error `cannot set "core.experimental.snapd-snap"` when repacking a core18 snap | snapcraft | closed | Fixed in PR #5694 and released in Snapcraft 7.5.9. Resolves a snapd error that failed on subsequent core18 LXD builds by correcting the experimental snapd-snap system option handling. | |
| #1939713 snapcraft init create base: core18 snap | snapcraft (launchpad) | closed | Closed without direct resolution, likely abandoned due to inactivity. Subsequent Snapcraft releases updated the init default to core20 and core22, effectively resolving the reported behavior. | |
| #5426 `snapcraft pack` should run the lifecycle for core18|20 in Snapcraft 7 | snapcraft | closed | Closed for Snapcraft 7. Fixed in Snapcraft 8.11 via merged pull request #5425, enabling snapcraft pack to run the lifecycle for core18 and core20 bases. | |
| #4870 snapcraft pack error obtuse on snapd errors | snapcraft | closed | Closed as a duplicate of issue #4548. The snapcraft pack error handling regression affecting core22 and core24 is superseded by the referenced tracking issue. | |
| #4960 Can't build Core20 snaps on non-snap distros | snapcraft | open | Core20 snap builds fail on non-snap distros (NixOS) due to LXD snap detection. Triaged with a proposed backport fix, but core20 support and snapcraft_legacy have since been removed from the project, making the issue no longer applicable. |