Can't find a way to get snapcraft compile even a simple project

Hi, 

I use the hello example on the tutorial. but ...

fabien@fabien-TERRA-MOBILE-1749S:~/Téléchargements/snap/myapp$ snapcraft
Launching a VM.
Launched: snapcraft-myhello                                                     
2019-12-13T08:50:46Z INFO Waiting for restart...
core 16-2.42.5 from Canonical✓ installed
snapcraft 3.8 from Canonical✓ installed
core18 20191126 from Canonical✓ installed
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [593 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]     
...
et:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4028 B]                                                                                                                                       
Get:32 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1856 B]                                                                                                                                       
Fetched 20.0 MB in 16s (1234 kB/s)                                                                                                                                                                                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
[Errno 1] Operation not permitted: 'snap/snapcraft.yaml'                        
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: yes
Thank you, sent.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
fabien@fabien-TERRA-MOBILE-1749S:~/Téléchargements/snap/myapp$ ^C               
fabien@fabien-TERRA-MOBILE-1749S:~/Téléchargements/snap/myapp$ snapcraft debug
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
Try "snapcraft -h" for help.

Error: No such command "debug".
fabien@fabien-TERRA-MOBILE-1749S:~/Téléchargements/snap/myapp$ snapcraft --debug
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`                                                                                                                                                                                     
snapcraft-myhello # ls
project  snap
snapcraft-myhello # exit
exit


  GNU nano 4.3                                                                                           snap/snapcraft.yaml                                                                                                     
name: myhello # you probably want to 'snapcraft register <name>'
base: core18 # 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:
  hello:
    command: bin/myhello

parts:
  gnu-hello:
    source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
    plugin: autotools

on kubuntu 19.10… any ideas ?

Hi @Gambix!

Can you please provide the output of:
SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=y snapcraft --debug

fabien@fabien-TERRA-MOBILE-1749S:~/Téléchargements/snap/myapp$ SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=y snapcraft --debug
Starting snapcraft 3.8 from /snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli.
snapcraft is running in a docker or podman (OCI) container
Parts dir /home/fabien/Téléchargements/snap/myapp/parts
Stage dir /home/fabien/Téléchargements/snap/myapp/stage
Prime dir /home/fabien/Téléchargements/snap/myapp/prime
snapcraft is running in a docker or podman (OCI) container
Parts dir /home/fabien/Téléchargements/snap/myapp/parts
Stage dir /home/fabien/Téléchargements/snap/myapp/stage
Prime dir /home/fabien/Téléchargements/snap/myapp/prime
Launching a VM.
Running multipass start snapcraft-myhello
start failed: The following errors occurred:
snapcraft-myhello: timed out waiting for response
Running multipass stop --time 10 snapcraft-myhello
Sorry, an error occurred in Snapcraft:
An error occurred with the instance when trying to start with ‘multipass’: returned exit code 2.
Ensure that ‘multipass’ is setup correctly and try again.
Traceback (most recent call last):
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_multipass/_multipass_command.py”, line 177, in start
_run(cmd)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_multipass/_multipass_command.py”, line 36, in _run
subprocess.check_call(command, stdin=stdin)
File “/snap/snapcraft/3440/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘multipass’, ‘start’, ‘snapcraft-myhello’]’ returned non-zero exit status 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/snap/snapcraft/3440/bin/snapcraft”, line 11, in
load_entry_point(‘snapcraft==3.8’, ‘console_scripts’, ‘snapcraft’)()
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 1114, in invoke
return Command.invoke(self, ctx)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/_runner.py”, line 103, in run
snap_command.invoke(ctx)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/_command.py”, line 87, in invoke
return super().invoke(ctx)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py”, line 261, in snap
_execute(steps.PRIME, parts=[], pack_project=True, output=output, **kwargs)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py”, line 87, in _execute
with build_provider_class(project=project, echoer=echo) as instance:
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_base_provider.py”, line 116, in enter
self.create()
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_multipass/_multipass.py”, line 156, in create
self.launch_instance()
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_base_provider.py”, line 237, in launch_instance
self._start()
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_multipass/_multipass.py”, line 125, in _start
self._multipass_cmd.start(instance_name=self.instance_name)
File “/snap/snapcraft/3440/lib/python3.5/site-packages/snapcraft/internal/build_providers/_multipass/_multipass_command.py”, line 181, in start
) from process_error
snapcraft.internal.build_providers.errors.ProviderStartError: An error occurred with the instance when trying to start with ‘multipass’: returned exit code 2.
Ensure that ‘multipass’ is setup correctly and try again.
You can find the traceback in file ‘/tmp/tmp0af9rfmi/trace.txt’.

1 Like

Same problem with “~/Документы/my_project_snap” path.
Change path to english names only and it’s working.

PS: macOS and Windows have default directories with english names (Downloads, Musics, Documents) for any localizations.

1 Like

Please provide utf-8 support in spancraft/micropass
It is strange what it can’t work when you launched it in profile directory like /home/alex/Проекты.