When installing a build-snap, error messages from snap install get eaten, and all we get is an error message that the install failed. In the full logs it would be nice to have some details about what that error is, similar to:
(craft-parts) lengau@ratel:~/Work/Code/craft-parts$ snap refresh --amend --classic --edge astral-uv
error: cannot perform the following tasks:
- Download snap "astral-uv" (3) from channel "edge" (received an unexpected http response code (503) when trying to download https://canonical-bos01.cdn.snapcraftcontent.com/download-origin/canonical-lgw01/sIDcER1W2Zzyh1fdjsRSydCItvqAyr6V_3.snap?interactive=1&token=1713906000_21bd7257951425974e6850c7969a638f3d475e06)
In case of errors like this, keeping the stderr in exception details would be ideal. (This would probably also require some work downstream to include that in the log file, but that could probably be done in craft-application to apply everywhere.)
To Reproduce
As of today/now, I'm able to reproduce this in https://github.com/lengau/uv-snap trying to build a fresh core24 snap. It's hard to reproduce though since it depends on a snap install erroring, but right now it's available thanks to a snapcraft.io outage 🙃
Potentially you could inject a proxy to talk to snapcraftcontent.com and have it return a 503 when downloading a snap?
Bug Description
When installing a build-snap, error messages from
snap install
get eaten, and all we get is an error message that the install failed. In the full logs it would be nice to have some details about what that error is, similar to:In case of errors like this, keeping the
stderr
in exception details would be ideal. (This would probably also require some work downstream to include that in the log file, but that could probably be done incraft-application
to apply everywhere.)To Reproduce
As of today/now, I'm able to reproduce this in
https://github.com/lengau/uv-snap
trying to build a fresh core24 snap. It's hard to reproduce though since it depends on a snap install erroring, but right now it's available thanks to a snapcraft.io outage 🙃Potentially you could inject a proxy to talk to
snapcraftcontent.com
and have it return a 503 when downloading a snap?part yaml
Relevant log output