Wrong error when no source specified
Metadata
Current evaluation
Closed without resolution. Reported a misleading error when the source field was omitted from snapcraft.yaml, which should explicitly require the source instead of failing on command execution.
Suggested action: —
No scores available.
Issue body
Consider the following yaml:
name: cookiecutter
base: core18
version: git
summary: A command-line utility that creates projects from cookiecutters
description: |
A command-line utility that creates projects from cookiecutters (project
templates), e.g. creating a Python package project from a Python package
project template.
* Documentation: https://cookiecutter.readthedocs.io
* GitHub: https://github.com/audreyr/cookiecutter
* Free and open source software: BSD license
grade: stable
confinement: strict
parts:
cookie:
plugin: python
python-version: python3
#source: .
apps:
cookiecutter:
command: cookiecutter
plugs: [network]
This produces the following error:
Successfully installed setuptools-40.6.2
Building cookie
Staging cookie
Priming cookie
Determining the version from the project repo (version: git).
The version has been set to '1.6.0+git88.db14e06'
Failed to generate snap metadata: The specified command 'cookiecutter' defined in the app 'cookiecutter' does not exist or is not executable.
Ensure that 'cookiecutter' is relative to the prime directory.
The error should be that I haven't specified source. Indeed, uncommenting that source line fixes the build.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Reported a misleading error when the source field was omitted from snapcraft.yaml, which should explicitly require the source instead of failing on command execution. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Fixed by improving validation to explicitly flag missing source configuration, replacing the misleading command-not-found error during snap builds. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed. The misleading error message for missing source fields was resolved by adding explicit validation to report the missing source configuration earlier in the build process. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | A missing source field caused a misleading command-not-found error. Closed without comments, indicating it was fixed or resolved in a subsequent update. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1815812 Totally misleading error on non-string version | snapcraft (launchpad) | closed | Closed without resolution. The suggested improvement for clearer error handling when non-string versions are provided in snapcraft.yaml was not implemented. | |
| #1650943 Wrong source-type in yaml is ignored | snapcraft (launchpad) | closed | Closed without a documented fix or PR. Invalid source-type values in snapcraft.yaml remain silently ignored, suggesting the bug was abandoned or resolved upstream without tracking. | |
| #1719968 Misleading error messages | snapcraft (launchpad) | closed | Closed without resolution. The report notes that missing dependencies cause snapcraft to output verbose Python tracebacks instead of clear error messages. No fix or follow-up was provided. | |
| #1741952 Unhandled source type provides traceback | snapcraft (launchpad) | closed | Closed. Missing source-type parameters triggered raw ValueErrors instead of SnapcraftErrors. No fix or PR was linked, indicating the report was likely abandoned or resolved in a later release without explicit tracking. |