snapcraft icon indicating copy to clipboard operation
snapcraft copied to clipboard

Building snap with `core20` failed with non-informative error message

Open chanchiwai-ray opened this issue 1 year ago • 2 comments

Bug Description

When packing a snap with core20 using snapcraft pack, the error message is not informative.

To Reproduce

Use the simple snap/snapcraft.yaml

name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core20 # 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

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: nil

and run snapcraft pack

Environment

Name       Version      Rev    Tracking         Publisher   Notes
lxd        6.1-efad198  29943  latest/stable    canonical✓  -
snapcraft  8.3.2        12378  latest/stable/…  canonical✓  classic

snapcraft.yaml

name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core20 # 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

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: nil

Relevant log output

snapcraft pack                                                                                                                                                                                                                      
Usage: snapcraft pack [OPTIONS] DIRECTORY                                                                                                                                                                              
Try 'snapcraft pack -h' for help.                                                                                                                                                                                                    
                                                                                                                                                                                                                                  
Error: Missing argument 'DIRECTORY'.

Additional context

Switching to core22 worked

chanchiwai-ray avatar Aug 27 '24 04:08 chanchiwai-ray

This will be fixed via #5425 and #5426.

mr-cal avatar Apr 28 '25 14:04 mr-cal

Thank you for reporting your feedback to us!

The internal ticket has been created: https://warthogs.atlassian.net/browse/SNAPCRAFT-1118.

This message was autogenerated