[SOLVED] Beginner: ran through tutorial, `hello` vs `username-hello.hello` as a result

Hi, noted this in https://discourse.ubuntu.com/t/create-your-first-snap/14006/9 – hope the duplication is fine.

$ snap --version
snap    2.48.2
snapd   2.48.2
series  16
ubuntu  20.04
kernel  5.4.0-60-generic

$ snapcraft --version
snapcraft, version 4.4.4

Had this behavior at the end of the tutorial;

ali@stinky:~/mysnaps/hello$ snapcraft
Launching a VM.
snap "snapd" has no updates available
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.

ali@stinky:~/mysnaps/hello$ ls snap/snapcraft.yaml -l
-rw-rw-r-- 1 ali ali 432 Jan 21 08:22 snap/snapcraft.yaml

ali@stinky:~/mysnaps/hello$ cat snap/snapcraft.yaml
name: hello
base: core18
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
  GNU hello prints a friendly greeting.

grade: stable
confinement: strict

    command: bin/hello
    command: bash

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

Switching the name back to aliwatters-hello worked fine (built, pushed, installed`

But – ended up having to run it with aliwatters-hello.hello – is this intended? – or user error?

My full notes on the tutorial are at; https://github.com/aliwatters/sandbox/tree/main/2021/snapcraft

This is expected. The snapname.appname format is used whenever the appname does not match the snapname. If you called your app (in the apps: block in your yaml) as aliwatters-hello instead of hello then because your snap is named aliwatters-hello you’ll be able to execute it with that name because the snap and app names match.

This is a method of keeping all apps of a particular snap “namespaced” so that they cannot conflict with another snap’s app names.

Thanks – yeah that was my guess. Thanks for confirming.

Wasn’t clear in the tutorial though, hope that suggestion is added.

This error is misleading, that could be improved – where should I report it?