Failures when running `snap pack` don't get sent to the user.
Metadata
Current evaluation
Fixed by merged PR #5188 (commit a9fc44093), which surfaces snapd's error output when snap pack fails instead of showing only the command and exit status.
Resolution: closed resolved
Reason: PR #5188 was merged as commit a9fc44093 and updates Snapcraft to display snapd's error line after snapd 2.66 made stderr available. This directly resolves the missing failure details.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
If `snap pack` fails, the error message (which is often helpful in determining why it failed) is hidden unless you enable debug logging or look in the detailed log file. Instead, the error message shows the specific command that was run in the instance (which isn't particularly useful to the user).
### To Reproduce
Run `snapcraft pack` with the provided `snapcraft.yaml`.
### Environment
Kubuntu 23.04
### snapcraft.yaml
```shell
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
thing:
command: this/file/does/not/exist
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
```
### Relevant log output
```shell
lengau@ratel:~/tmp$ snapcraft pack
Launching instance...
Executed: pull my-part
Executed: build my-part
Executed: stage my-part
Executed: prime my-part
Executed parts lifecycle
Generated snap metadata
Command '['snap', 'pack', '--filename', 'my-snap-name_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
Failed to execute pack in instance.
Recommended resolution: Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
Full execution log: '/home/lengau/.local/state/snapcraft/log/snapcraft-20231215-111314.031750.log'
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #5188 (commit a9fc44093), which surfaces snapd's error output when snap pack fails instead of showing only the command and exit status. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #5188 (commit a9fc44093), surfacing snapd's error output when `snap pack` failed after snapd 2.66 added stderr support. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #5188 (commit a9fc44093): Snapcraft now surfaces snapd's error output when `snap pack` fails, after snapd 2.66 added stderr support. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #5188 (commit a9fc44093), which surfaced snapd’s error line when `snap pack` failed after snapd 2.66 released its stderr support. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved after snapd 2.66 release enabled stderr exposure. Snapcraft now displays pack failure messages directly to users. Related validation improvements were merged in PR #5164. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Fixed after being blocked by snapd. The snapd 2.66 release enabled snapcraft to parse and display the actual error from snapd stderr. Related build validation improvements were also merged in PR #5164. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved after snapd 2.66 enabled stderr capture. Snapcraft now filters and displays the actual error message instead of hiding it. Related validation improvements were merged in PR #5164. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed after snapd 2.66 release enabled proper error capture. Validation improvements in PR #5164 address common snap pack failures, resolving the hidden error output issue. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/snapcraft#5188
(confidence 100%)
Merged fix for surfacing snapd's error output from a failed snap pack operation.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4413 Error message on snap pack is not nice | snapcraft | closed | Fixed by merged PR #4424 (commit ec09cc07b): pack failures now show concise snapd errors while command details remain in execution logs; backported to 7.x and 8.x. | |
| #5188 fix: improve error message from snapd pack | snapcraft | merged | Merged PR #5188 in commit a9fc44093, improving snapd pack failures by surfacing snapd's error output and fixing snapcraft#4499. | |
| #4548 Make `snap pack ...` errors also return the problem instead of just the error code | snapcraft | closed | Closed by mr-cal as a duplicate of #4499 (tracked as CRAFT-2559); that issue was fixed by merged PR #5188 (commit a9fc44093), which surfaces snapd's error output when `snap pack` fails. |