← Back to issue list

snapcraft clean crashes on snapcraft.yaml with bad indent

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1829564
Type
issue
State
open
Author
~dank
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft 2.43.1 exposed a raw YAML traceback for an invalidly indented manifest; the repro is exact, but the untriaged report has no maintainer resolution and current code wraps YAML errors.

Suggested action: needs triage

Reason: The report supplies the command, Snapcraft 2.43.1 version, and complete malformed manifest; a 2020 commenter reproduced the traceback and fixed it by correcting indentation. There are no labels or maintainer responses, while current yaml_utils code catches yaml.error.YAMLError and raises SnapcraftError, so the remaining historical behavior needs assessment.

Evaluated by: mr-cal-bot

Impact: 25 Quick Win: 15 Complexity: 20 Confidence: 86 Actionability: 75

Issue body

snapcraft felt it was important I share this with you :-) Running snapcraft on Ubuntu 19.04. $ snapcraft --version snapcraft, version 2.43.1+18.10 The log: $ snapcraft clean Sorry, an error occurred in Snapcraft: Traceback (most recent call last): File "/usr/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==2.43.1+18.10', 'console_scripts', 'snapcraft')() ... File "/usr/lib/python3/dist-packages/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/lib/python3/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key "expected <block end>, but found %r" % token.id, token.start_mark) yaml.parser.ParserError: while parsing a block mapping in "snapcraft.yaml", line 19, column 3 expected <block end>, but found '<block mapping start>' in "snapcraft.yaml", line 36, column 4 We would appreciate it if you created a bug report at https://launchpad.net/snapcraft/+filebug with the above text included. The snapcraft.yaml provoking the crash (note the inconsistent indent level between the two parts): name: fpm version: 1.1 summary: Effing Package Management description: | Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity. http://fpm.readthedocs.io/en/latest/ grade: devel confinement: devmode apps: fpm: environment: RUBYLIB: $SNAP/usr/lib/ruby/2.3.0:$SNAP/usr/lib/x86_64-linux-gnu/ruby/2.3.0 GEM_HOME: $SNAP/gems GEM_PATH: $SNAP command: ruby $SNAP/bin/fpm parts: fpm: source: . plugin: nil build-packages: - build-essential - ruby-dev - rubygems-integration - libreadline-dev - libssl-dev - libtinfo-dev stage-packages: - ruby - rubygems-integration override-build: | snapcraftctl build gem install fpm -i $SNAPCRAFT_PART_INSTALL mangle-shebang: plugin: nil after: [fpm] override-build: | snapcraftctl build sed -i 's/#!\/usr\/bin\/ruby/#!\/usr\/bin\/env ruby/' $SNAPCRAFT_STAGE/usr/bin/{gem2.3,rdoc2.3,fpm,rake} Removing the extra space at the start of the 'mangle-shebang:' line worked around the problem

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 25
Quick Win: 15
Complexity: 20
Confidence: 86
Actionability: 75
needs triage Snapcraft 2.43.1 exposed a raw YAML traceback for an invalidly indented manifest; the repro is exact, but the untriaged report has no maintainer resolution and current code wraps YAML errors.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 15
Complexity: 35
Confidence: 86
Actionability: 79
needs triage Malformed indentation in snapcraft.yaml makes snapcraft clean emit a raw PyYAML traceback in Snapcraft 2.43.1; an exact reproducer and successful indentation workaround are provided.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 13
Complexity: 40
Confidence: 82
Actionability: 70
needs triage Snapcraft 2.43.1 exposes a raw PyYAML ParserError traceback when clean encounters inconsistent indentation; a reproducer and workaround are provided, but no triage or resolution is documented.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 19
Staleness: 92
Complexity: 25
Confidence: 60
Support Request: 15
close stale snapcraft 2.43.1 (Ubuntu 19.04) crashes with a raw PyYAML traceback when snapcraft.yaml has inconsistent indentation. 7+ years old, no labels, no comments, and the affected 2.x version is long out of support.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 20
Confidence: 90
Support Request: 10
close stale Reports a crash in snapcraft clean when processing a snapcraft.yaml with inconsistent indentation. Provides traceback and workaround. Unlabeled, no maintainer interaction, inactive for over six years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 10
Confidence: 85
Support Request: 90
close stale snapcraft clean crashes due to YAML indentation error in snapcraft.yaml. Issue is 7+ years old, no activity, and the problem is a user configuration error rather than a tool bug.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 5
Confidence: 90
Support Request: 10
close stale Reports a crash in snapcraft clean caused by inconsistent YAML indentation in snapcraft.yaml. The author identified the syntax error and provided a workaround. Issue is 7 years old with no maintainer interaction.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.