Snapcraft stuck after reporting "Snapped ...snap"


Using snapcraft-7.1.1 with multipass-1.10.1 snap gets stuck after stating

Snapped …snap

While there seems to be a controlling process on the host:

3334565 /snap/multipass/7689/bin/multipass exec snapcraft-rabbitmq-server-snap -- sudo -H -i env SNAPCRAFT_BUILD_ENVIRONMENT=managed-host HOME=/root SNAPCRAFT_HAS_TTY=False http_proxy=http://squid-deb-proxy.virtual:8080 snapcraft snap

there is no corresponding snapcraft process inside the VM. It seems as if the snapcraft command on the host side missed the message that everything is done inside the VM.

Is this problem reproducible after snapcraft clean? I successfully built the rabbitmq-server-snap snap from the github main branch, but maybe you’re working on a different branch or with local modifications. Is there any change I should do to reproduce the problem locally?

My attempt:

$ multipass --version
multipass   1.10.1
multipassd  1.10.1

$ snapcraft
Launching a VM.
'SNAPCRAFT_BUILD_ENVIRONMENT_CPU' was set to '16' in the environment. Changing the default allocation upon user request
Launched: snapcraft-rabbitmq-server-snap
Get:1 bionic-security InRelease [88.7 kB]
Get:2 bionic InRelease [242 kB]


Priming erlang
+ snapcraftctl prime
Priming elixir
+ snapcraftctl prime
Priming rabbitmq-server
+ snapcraftctl prime
Priming rabbitmq-support
+ snapcraftctl prime
Snapping |
Snapped rabbitmq-server-snap_3.8.35_amd64.snap

If this keeps happening and you’re running on a Linux host you can try snapcraft --use-lxd to use LXD instead of multipass.

Thanks for the reply!

I am building from main, i.e. b9a9a8fc2a36248e71c0e0b6f4ffa92e85d99ab5. Cleaning the VM does not make a difference unfortunately. And I see the same behavior with multipass or lxd.

Another data point: The GitHub action for CI ( fails in the same way as are the builders in snapcraft (

It’s odd that the fail is consistent since it works on my machine. Maybe you could try to just prime the snap, and then pack by hand to see if that works? The actual packing is performed using the snap tool, so after you run snapcraft prime you can enter the VM or container and run snap pack <prime directory> to generate the snap file.

Another experiment would be to pack a different snap to see if it also fails, or if the problem only happens with this particular snap.

snapcraft prime --shell-after
snap pack prime

works flawlessly.

I can snap other snaps without any issues.

I found that when I disable the tests for Elixir the build does not block anymore, see

This is interesting because prime/pack works without blocking during the tests execution. Could it be something related to timing? :thinking:

1 Like

Potentially yes. Very annoyingly I can’t reproduce this issue on my laptop anymore. It is still present in GitHub actions and snapcraft builders though.

I have also added to switch to core20 (or core22) however that build is failing now at a completely different spot. I will open another discussion thread.

Please see Snapcraft not completing `override-build` script