Thanks for the report, @rasid.
This issue was recently raised in the craft-providers
library. The problem is that we aren’t disabling auto-refresh when building core22 snaps.
I haven’t able to reproduce the failure, so I don’t have a good workaround. I believe when this happens, the container is still running, which would mean the snap refresh should complete after a few minutes and the next run of snapcraft would be successful.
If that doesn’t work, then the not-so-pretty workaround is going to be to run snapcraft clean
and delete the cached LXD image (which you can see with lxc --project snapcraft image list
).