← 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 (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.

Suggested action: close stale

Reason: The report targets snapcraft 2.43.1 on Ubuntu 19.04, a version line that has been out of support for years, and the current codebase is the 3.x rewrite (snapcraft/models, snapcraft/commands) with a different YAML-handling layer than the 2.x code that produced this traceback. The issue has had zero comments, no labels, and no maintainer interaction for over 6 years, and the near-identical Launchpad bug 1608032 was already closed as abandoned, so it is no longer actionable as reported.

Impact: 25 Quick Win: 18.75 Staleness: 92 Complexity: 25 Confidence: 60 Support Request: 15

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
qwen/qwen3.8-27b
Impact: 25
Quick Win: 18.75
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 85
Support Request: 20
close stale Reports a crash when running snapcraft clean on a malformed snapcraft.yaml with inconsistent indentation. Issue is over 7 years old with no maintainer response or labels.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: snapcraft#1608032 (confidence 70%)

    Launchpad bug 1608032 'snapcraft crashes with useless message on bad YAML' reports the same raw-traceback-on-invalid-YAML problem and was closed as abandoned.

Related issues

Issue Project State Summary Similarity
#1869542 snapcraft unable to find snap/snapcraft.yaml file snapcraft (launchpad) open snapcraft 3.11 (2019) loses snap/snapcraft.yaml after a few builds and drops to the VM shell; workaround is snapcraft clean. 6+ years old, no labels, no maintainer comments, tied to a long-superseded build environment.
74%
#1608032 snapcraft crashes with useless message on bad YAML snapcraft (launchpad) closed Abandoned. Snapcraft crashed with an unhelpful error on invalid YAML. No fix or follow-up was provided.
74%