snapcraft list-revisions -h crashes
Metadata
Current evaluation
Crash in `snapcraft list-revisions -h` (IndexError in helptexts) was a duplicate of canonical/snapcraft#5169; fixed by merged PR #5178 (commit f97d032bf), shipped in snapcraft 8.5.1.
Resolution: closed resolved
Reason: Maintainer ~mr-cal linked the duplicate GitHub report #5169 and closed the Launchpad bug after PR #5178 (merged as commit f97d032bf, 'fix: properly present help when posargs have no help') was released in snapcraft 8.5.1, adding the missing help text for the positional args.
Evaluated by: mr-cal-bot
No scores available.
Issue body
installed version: 8.5.0 (13008) 71MB classic
$ snapcraft list-revisions -h
Internal error while loading snapcraft: IndexError('list index out of range')
Full execution log: '/home/abeato/.local/state/snapcraft/log/snapcraft-20241211-112621.443741.log'
Traceback (most recent call last):
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/application.py", line 502, in _get_dispatcher
global_args = dispatcher.pre_parse_args(sys.argv[1:], app_config)
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 458, in pre_parse_args
help_text = self._get_requested_help(filtered_sysargs, app_config)
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 358, in _get_requested_help
return self._help_builder.get_command_help(command, command_options, output_format)
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/helptexts.py", line 468, in get_command_help
textblocks = builder(command, usage, parameters, options, other_command_names)
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/helptexts.py", line 337, in _build_plain_command_help
positional_args_lines.extend(_build_item_plain(title, text, max_title_len))
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/helptexts.py", line 71, in _build_item_plain
first = f" {title:>{title_space}s}: {wrapped_lines[0]}"
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/application.py", line 663, in run
return_code = self._run_inner()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/snapcraft/application.py", line 202, in _run_inner
return_code = super()._run_inner()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/application.py", line 610, in _run_inner
dispatcher = self._get_dispatcher()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/snapcraft/application.py", line 431, in _get_dispatcher
return super()._get_dispatcher()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/application.py", line 525, in _get_dispatcher
if self.services.config.get("debug"):
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/services/service_factory.py", line 125, in __getattr__
instance.setup()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/services/config.py", line 163, in setup
super().setup()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/services/base.py", line 45, in setup
emit.debug(f"Setting up {self.__class__.__name__}")
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/messages.py", line 417, in func
raise RuntimeError("Emitter is stopped already")
RuntimeError: Emitter is stopped already
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/13008/bin/snapcraft", line 8, in <module>
sys.exit(main())
File "/snap/snapcraft/13008/lib/python3.10/site-packages/snapcraft/application.py", line 482, in main
return app.run()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/application.py", line 693, in run
if self.services.config.get("debug"):
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/services/service_factory.py", line 125, in __getattr__
instance.setup()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/services/config.py", line 163, in setup
super().setup()
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_application/services/base.py", line 45, in setup
emit.debug(f"Setting up {self.__class__.__name__}")
File "/snap/snapcraft/13008/lib/python3.10/site-packages/craft_cli/messages.py", line 417, in func
raise RuntimeError("Emitter is stopped already")
RuntimeError: Emitter is stopped already
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Crash in `snapcraft list-revisions -h` (IndexError in helptexts) was a duplicate of canonical/snapcraft#5169; fixed by merged PR #5178 (commit f97d032bf), shipped in snapcraft 8.5.1. | |
| stealth/space-bunny-alpha | — | closed resolved | Crash in `snapcraft list-revisions -h` (IndexError in help rendering) fixed by PR #5178 (commit f97d032bf), released in snapcraft 8.5.1. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed after the reporter confirmed the list-revisions help crash affected only an old Snapcraft version; no code fix was reported. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed and closed. The IndexError crash when running snapcraft list-revisions -h was resolved via an upstream craft-cli dependency update, eliminating the help text generation failure. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed four days after creation without comments or a fix. The issue was abandoned, leaving the craft_cli help command crash unresolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a direct fix noted. Running snapcraft list-revisions -h triggered an IndexError in craft-cli help generation, causing a runtime crash. Likely addressed upstream or abandoned. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments. The crash stemmed from an IndexError in craft_cli help text generation during argument parsing, followed by a stopped emitter error. Appears abandoned or resolved upstream. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#5178
(confidence 99%)
Merged PR fixing help rendering when positional args lack help text; released in 8.5.1
-
Duplicate Of:
canonical/snapcraft#5169
(confidence 98%)
Reporter's crash was the same 'snapcraft help fails on many commands' bug
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5184 Running snapcraft list-revision is giving error | snapcraft | closed | Reporter confirmed the list-revisions help IndexError occurred only in an old Snapcraft version; no code fix was needed, and current releases use revisions. |