snapcraft fails ugly with multipass when a space is inserted into `name:` field
Metadata
Current evaluation
snapcraft launched Multipass before validating snapcraft.yaml, so a space in `name:` produced an opaque 'Invalid instance name' error. Fixed by merged PR #2388 (commit ba65313cc) adding early snapcraft.yaml validation.
Resolution: closed resolved
Reason: Maintainer @~sergiusens pointed to snapcore/snapcraft PR #2388, which was merged as commit ba65313cc ('project: early snapcraft.yaml validation'); it validates the project file before the Multipass VM is launched and fixes LP #1794507.
Evaluated by: mr-cal-bot
No scores available.
Issue body
error log:
$ snapcraft
```
Launching a VM.
failed to launch: Invalid arguments supplied
Invalid instance name supplied: snapcraft-alsa test
An error occurred when trying to launch the instance with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
```
snapcraft.yaml:
```
name: alsa test
version: 0.1
summary: Tests the alsa part for chaining
description: |
The alsa part should support chaining directly.
This file tries to see if it works.
grade: devel
confinement: strict
parts:
test:
plugin: nil
after: [alsa-chain-test]
```
note it accidentally includes a space in the `name:` field - while this is incorrect syntax for snapcraft.yaml the tool should be more friendly in pointing out the problem.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | snapcraft launched Multipass before validating snapcraft.yaml, so a space in `name:` produced an opaque 'Invalid instance name' error. Fixed by merged PR #2388 (commit ba65313cc) adding early snapcraft.yaml validation. | |
| stealth/space-bunny-alpha | — | closed resolved | Reported ugly multipass launch failure when a space is in snapcraft.yaml `name:`. Fixed by merged PR #2388 (commit ba65313cc) adding early snapcraft.yaml validation (LP #1794507). | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a documented fix; matching Launchpad bug #1794507 was also closed without resolution, with no linked PR or commit. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Reported a cryptic multipass launch failure when a space was present in the snapcraft name field, requesting better input validation. No fix or follow-up action was taken. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as invalid without a fix. Snapcraft lacks input validation for spaces in the name field, resulting in a confusing multipass launch error. No code changes or follow-up actions were implemented. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#2388
(confidence 95%)
Merged PR cited in the closing comment; commit ba65313cc adds early snapcraft.yaml validation ahead of VM launch.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2388 project: early snapcraft.yaml validation | snapcraft | merged | Merged PR #2388 (ba65313cc) adds early snapcraft.yaml validation, preventing invalid Multipass instances and speeding up feedback; fixes LP #1794507. | |
| #1806083 snapcraft fails to locate multipass (inside a multipass session) | snapcraft (launchpad) | open | Snapcraft 3.0.1 falsely reported Multipass missing inside a Multipass guest; Darwin-only detection in e9ae8d29f addressed the old path, but the Launchpad record remains open. | |
| #1794955 snapcraft erroneously errors when deleting non-existent multipass container | snapcraft (launchpad) | open | snapcraft clean treats an absent Multipass instance as a deletion error after Multipass was reinstalled; the report is concrete but untriaged and may need validation against the current clean path. | |
| #1720230 snapcraft fails in a directory with spaces | snapcraft (launchpad) | closed | Fixed directory names with spaces by quoting environment-variable values in project_loader; merged as snapcore/snapcraft#1578 (commit d154224d7). | |
| #1869542 snapcraft unable to find snap/snapcraft.yaml file | snapcraft (launchpad) | open | Snapcraft 3.11 on Multipass intermittently lost the project dir in the VM ('Could not find snap/snapcraft.yaml'), only fixable by `snapcraft clean`. Reproducer never supplied; reporter redirected it to the Multipass tracker and never followed up. |