`charmcraft pack` Internal error on a 26.04 host
Metadata
Current evaluation
Fixed in the latest edge build; commit eeca3f79 (PR #2764) updated craft-providers to >=3.7.1 for newer Ubuntu base support.
Resolution: closed resolved
Reason: Maintainer @st3v3nmw confirmed that the latest edge build fixed the 26.04 host crash. Commit eeca3f79 in PR #2764 subsequently updated craft-providers to >=3.7.1 for support on current Ubuntu releases.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Check existing issues
- [x] I've verified that this bug isn't described by any existing issues.
### Bug description
When I run `charmcraft pack` on my 26.04 host, for an ubuntu@24.04 base charm, I get an internal error:
```
$ charmcraft pack
charmcraft internal error: ValueError("'26.04' is not a valid BuilddBaseAlias")
Full execution log: '/home/andreas/.local/state/charmcraft/log/charmcraft-20260507-160644.046754.log'
```
The log has this backtrace:
```
2026-05-07 16:08:52.553 Executing on host: lxc query 'local:/1.0?public'
2026-05-07 16:08:52.778 charmcraft internal error: ValueError("'26.04' is not a valid BuilddBaseAlias")
2026-05-07 16:08:52.799 Traceback (most recent call last):
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/application.py", line 663, in run
2026-05-07 16:08:52.800 return_code = self._run_inner()
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/application/main.py", line 143, in _run_inner
2026-05-07 16:08:52.800 return super()._run_inner()
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/application.py", line 640, in _run_inner
2026-05-07 16:08:52.800 return_code = dispatcher.run() or os.EX_OK
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
2026-05-07 16:08:52.800 return self._loaded_command.run(self._parsed_command_args)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/commands/base.py", line 200, in run
2026-05-07 16:08:52.800 result = self._run(parsed_args, **kwargs) or result
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/application/commands/lifecycle.py", line 167, in _run
2026-05-07 16:08:52.800 result = super()._run(parsed_args, step_name, **kwargs)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 619, in _run
2026-05-07 16:08:52.800 return super()._run(parsed_args=parsed_args, step_name=step_name)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 232, in _run
2026-05-07 16:08:52.800 self._run_manager_for_build_plan(fetch_service_policy)
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 97, in _run_manager_for_build_plan
2026-05-07 16:08:52.800 provider.run_managed(build, bool(fetch_service_policy))
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/services/provider.py", line 459, in run_managed
2026-05-07 16:08:52.800 with self.instance(
2026-05-07 16:08:52.800 File "/snap/charmcraft/current/usr/lib/python3.12/contextlib.py", line 137, in __enter__
2026-05-07 16:08:52.800 return next(self.gen)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/services/provider.py", line 117, in instance
2026-05-07 16:08:52.800 with super().instance(
2026-05-07 16:08:52.800 File "/snap/charmcraft/current/usr/lib/python3.12/contextlib.py", line 137, in __enter__
2026-05-07 16:08:52.800 return next(self.gen)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/services/provider.py", line 185, in instance
2026-05-07 16:08:52.800 with provider.launched_environment(
2026-05-07 16:08:52.800 File "/snap/charmcraft/current/usr/lib/python3.12/contextlib.py", line 137, in __enter__
2026-05-07 16:08:52.800 return next(self.gen)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_providers/lxd/lxd_provider.py", line 182, in launched_environment
2026-05-07 16:08:52.800 bases.ensure_guest_compatible(
2026-05-07 16:08:52.800 File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_providers/bases/checks.py", line 93, in ensure_guest_compatible
2026-05-07 16:08:52.800 host_base_alias = BuilddBaseAlias(host_os_release.get("VERSION_ID"))
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/current/usr/lib/python3.12/enum.py", line 757, in __call__
2026-05-07 16:08:52.800 return cls.__new__(cls, value)
2026-05-07 16:08:52.800 ^^^^^^^^^^^^^^^^^^^^^^^
2026-05-07 16:08:52.800 File "/snap/charmcraft/current/usr/lib/python3.12/enum.py", line 1171, in __new__
2026-05-07 16:08:52.800 raise ve_exc
2026-05-07 16:08:52.800 ValueError: '26.04' is not a valid BuilddBaseAlias
```
### Steps to reproduce
On an ubuntu 26.04 host, run `charmcraft pack` on a charm.
### Environment
Ubuntu 26.04
default LXD
### charmcraft.yaml
I don't believe there are specifics in the charmcraft.yaml file.
### Log output
Pasted above in the description.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in the latest edge build; commit eeca3f79 (PR #2764) updated craft-providers to >=3.7.1 for newer Ubuntu base support. | |
| stealth/space-bunny-alpha | — | closed resolved | The Ubuntu 26.04 host crash was reported fixed in the latest edge build, but no linked PR or commit documents the change. | |
| qwen/qwen3.6-35b-a3b |
Impact:
70
Quick Win:
50
Complexity:
20
Confidence:
85
Actionability:
90
|
close resolved | charmcraft pack fails on Ubuntu 26.04 host due to missing BuilddBaseAlias. Fix merged in craft-providers; user confirmed edge version resolves it. | |
| qwen/qwen3.8-27b |
Impact:
65
Quick Win:
46
Staleness:
35
Complexity:
30
Confidence:
80
Support Request:
5
|
keep open | charmcraft pack crashes on Ubuntu 26.04 hosts with ValueError '26.04' is not a valid BuilddBaseAlias, raised in craft-providers' guest-compatibility check. Maintainer confirmed latest edge fixes it; main now pins craft-providers >=3.7.1 which includes the fix. | |
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
38
Staleness:
55
Complexity:
30
Confidence:
70
Support Request:
10
|
keep open | charmcraft pack crashes with ValueError('26.04' is not a valid BuilddBaseAlias) on an Ubuntu 26.04 host. Root cause is in craft-providers' ensure_guest_compatible, which maps the host VERSION_ID to a BuilddBaseAlias enum that lacked 26.04. Fixed upstream in craft-providers (ignore unknown Ubuntu versions in bases check), and the latest edge reportedly works. | |
| qwen/qwen3.8-27b |
Impact:
60
Quick Win:
45
Staleness:
45
Complexity:
25
Confidence:
70
Support Request:
10
|
keep open | charmcraft pack crashes on Ubuntu 26.04 hosts with ValueError: '26.04' is not a valid BuilddBaseAlias in craft-providers' ensure_guest_compatible. Fixed upstream in craft-providers (RESOLUTE alias added); reporter confirmed latest edge works. Awaiting stable release. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
60
Complexity:
20
Confidence:
85
Support Request:
0
|
needs triage | charmcraft pack crashes on Ubuntu 26.04 hosts because 26.04 is missing from the BuilddBaseAlias enum. A commenter reports the edge version resolves it, but the issue remains unlabelled and unacknowledged by maintainers. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
20
Confidence:
90
Support Request:
0
|
needs triage | charmcraft pack crashes on Ubuntu 26.04 hosts due to an unrecognized BuilddBaseAlias enum value. A commenter reports that the latest edge version resolves the issue, but it remains unlabelled and untriaged. |
Update history
| Date | Change |
|---|---|
| closed |
Related work
-
Likely Fixed By:
canonical/charmcraft#2764
(confidence 82%)
Merged commit eeca3f79 updated craft-providers for Ubuntu 25.10/26.04-era compatibility.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2158 "Invalid hostname" error when packing charm that runs on multiple bases | charmcraft | closed | The invalid-hostname failure was fixed by canonical/craft-providers#722 (commit cabdba5), removing underscores from generated hostnames. The fix shipped through Charmcraft; Microceph's network error was Docker-related. | |
| #2631 Multiple `charmcraft pack` fail on mismatching platforms | charmcraft | open | Consecutive charmcraft pack runs with different platform sets fail: second charm (24.04 only) launches a 22.04 instance and errors 'Platform not found'. Regression from 4.0.1, still present in 4.3.1, no maintainer response. |