Cannot build image: Error preparing image: cannot override channels, add devmode snaps, local snaps, or extra snaps with a model of grade higher than dangerous

I’m trying to build an image with the following command:

ubuntu-image snap pi3-20.model

I’m not specifying snaps other than ones in the pi3-20.model

The content of pi3-20.model (I removed a signature):

type: model
authority-id: oomL7iifcUx0ruimDBXHorpgT9qCVdCt
series: 16
brand-id: oomL7iifcUx0ruimDBXHorpgT9qCVdCt
model: pi3-20
architecture: armhf
base: core20
grade: signed
snaps:
  -
    default-channel: pi3/stable
    id: QZjH2wCkCkcP5Eh3HofCYR7GKnAnvg8C
    name: screenly-pi-gadget
    type: gadget
  -
    default-channel: 20/stable
    id: jeIuP6tfFrvAdic8DMWqHmoaoukAPNbJ
    name: pi-kernel
    type: kernel
  -
    default-channel: latest/stable
    id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
    name: snapd
    type: snapd
  -
    default-channel: latest/stable
    id: DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q
    name: core20
    type: base
  -
    default-channel: 20/stable
    id: RmBXKl6HO6YOC2DE4G2q1JzWImC04EUy
    name: network-manager
  -
    default-channel: latest/stable
    id: bvBwbB7aeomIdJxpQh9lakQByyJtyKXp
    name: screenly-client
store: screenly
timestamp: 2021-07-29T12:35:55.000Z

I downloaded all snaps and checked their grade and confinement (https://paste.ubuntu.com/p/HNqCkppmcm/):

u1000@338d9ca8c780:/work/pi3-20$ find ./ -name snap.yaml | xargs grep grade
find: ‘./core20/var/lib/snapd/void’: Permission denied
./screenly-client/meta/snap.yaml:grade: stable
./network-manager/meta/snap.yaml:grade: stable
./screenly-pi-gadget/meta/snap.yaml:grade: stable
./pi-kernel/meta/snap.yaml:grade: stable
./core20/meta/snap.yaml:grade: stable
./snapd/meta/snap.yaml:grade: stable
u1000@338d9ca8c780:/work/pi3-20$ find ./ -name snap.yaml | xargs grep confinement
find: ‘./core20/var/lib/snapd/void’: Permission denied
./screenly-client/meta/snap.yaml:confinement: strict
./network-manager/meta/snap.yaml:confinement: strict
./screenly-pi-gadget/meta/snap.yaml:confinement: strict
./pi-kernel/meta/snap.yaml:confinement: strict
./core20/meta/snap.yaml:confinement: strict
./snapd/meta/snap.yaml:confinement: strict
u1000@338d9ca8c780:/work/pi3-20$ 

The version of ubuntu-image is 2.0+snap2

So, I can’t understand what ubuntu-image wants from me?

Thanks for any help

How do you invoke the command? Are all the snaps passed as --snap foo.snap asserted?

Thanks for your reply, @mborzecki.

I execute this command: ubuntu-image snap pi3-20.model

I’m not specifying any extra snaps.

I would suggest temporarily switching ubuntu-image to the stable channel, until this gets sorted out.

(cc @jawn-smith this looks like a regression, also reported in https://bugs.launchpad.net/snapd/+bug/1933665/comments/13)

Thanks, @mborzecki, I will keep watching the bug you noted.