"Could not find snap/snapcraft.yaml" when it is there


I am trying to build a snap. Snapcraft has worked for me on this machine in the past, but now it is continuously failing with:

    $ snapcraft
    Launching a VM.
    Could not find snap/snapcraft.yaml. Are you sure you are in the right directory?
    To start a new project, use `snapcraft init`
    Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
    An error occurred when trying to execute 'sudo -i env SNAPCRAFT_HAS_TTY=True snapcraft snap' with 'multipass': returned exit code 2.

The snapcraft.yaml does exist in snap and if I do:

    $ snapcraft init
    snap/snapcraft.yaml already exists!


What directory are you in when you run snapcraft init? Preferably not your home directory.
What version of snapcraft and snapd do you have? Can you please paste the output from:

snap version

snapcraft version


This looks like Snapcraft failed to mount the project folder into the VM. Not sure what’s wrong though.

You might want to run again with the SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes environment variable, and check out the log of the snap.multipass unit.


had the same issue a couple of times, this is how I solved it:

multipass list
note which instances exist, if any delete with
multipass delete --purge snapcraft-instance-name
reinstall multipass
sudo snap remove multipass
snapcraft (will install multipass automatically)

Sometimes multipass gets stuck (or freezes), this workaround works though!
Hope this helps.


I have run into this a couple of times myself, I thought the issue was fixed, if this persists, do you mind login an issue on https://github.com/CanonicalLtd/multipass/issues/ ?


Hey @aaronw, it’s likely to be this issue - we fixed it since the last release, but it’s not yet available in beta. You can snap refresh multipass --edge to get the edge version with the fix.


Thanks for the reply.

I am in the project root directory, so:
and the snapcraft.yaml is in:

snap version:
$ snap version
snap 2.38+18.10
snapd 2.38+18.10
series 16
ubuntu 18.10
kernel 4.18.0-17-generic

$ snapcraft version
snapcraft, version 3.4


Thanks @joshirio ! Removing and reinstalling multipass solved this for me – perhaps also because the fix @Saviq has made it into beta in the meantime (@Saviq just refreshing the multipass version did not seem to be enough).