Running snapcraft list-revision is giving error
Metadata
Current evaluation
An IndexError occurred when running snapcraft list-revisions -h. The author later noted it stemmed from an outdated version, resulting in the report being closed as invalid without a code fix.
Suggested action: —
No scores available.
Issue body
### Bug Description
When I run `list-revisions -h` I get IndexError
### To Reproduce
run `snapcraft list-revisions -h`
### Environment
snap 2.67
snapd 2.67
series 16
ubuntu 24.10
kernel 6.11.0-13-generic
### snapcraft.yaml
```yaml
NA
```
### Relevant log output
```shell
Internal error while loading snapcraft: IndexError('list index out of range')
Full execution log: '/home/soumyaxkubuntu/.local/state/snapcraft/log/snapcraft-20241218-180849.833478.log'
Traceback (most recent call last):
File "/snap/snapcraft/x1/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/x1/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/x1/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/x1/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/x1/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/x1/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/x1/lib/python3.10/site-packages/craft_application/application.py", line 663, in run
return_code = self._run_inner()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/snapcraft/application.py", line 202, in _run_inner
return_code = super()._run_inner()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 610, in _run_inner
dispatcher = self._get_dispatcher()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/snapcraft/application.py", line 431, in _get_dispatcher
return super()._get_dispatcher()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 525, in _get_dispatcher
if self.services.config.get("debug"):
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/services/service_factory.py", line 125, in __getattr__
instance.setup()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/services/config.py", line 163, in setup
super().setup()
File "/snap/snapcraft/x1/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/x1/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/x1/bin/snapcraft", line 8, in <module>
sys.exit(main())
File "/snap/snapcraft/x1/lib/python3.10/site-packages/snapcraft/application.py", line 482, in main
return app.run()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/application.py", line 693, in run
if self.services.config.get("debug"):
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/services/service_factory.py", line 125, in __getattr__
instance.setup()
File "/snap/snapcraft/x1/lib/python3.10/site-packages/craft_application/services/config.py", line 163, in setup
super().setup()
File "/snap/snapcraft/x1/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/x1/lib/python3.10/site-packages/craft_cli/messages.py", line 417, in func
raise RuntimeError("Emitter is stopped already")
RuntimeError: Emitter is stopped already
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | An IndexError occurred when running snapcraft list-revisions -h. The author later noted it stemmed from an outdated version, resulting in the report being closed as invalid without a code fix. | |
| qwen/qwen3.6-35b-a3b | — | — | Running snapcraft list-revisions -h triggered an IndexError that the author later attributed to an outdated version, resulting in the issue being closed as resolved without a code fix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Issue closed as abandoned after author confirmed it stemmed from an outdated version. No code fix required. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Reporter encountered an IndexError running snapcraft list-revisions -h. Later clarified the error stemmed from an outdated version. Issue closed as resolved by the author without a code fix. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1604810 try to snapcraft release an unexisting revision shows the wrong error | snapcraft (launchpad) | open | Misleading error when running snapcraft release with a non-existent revision: it suggests 'snapcraft register' instead of saying the revision is invalid. Filed by maintainer elopio in 2016, labelled bitesize, 0 comments, no activity for ~9.5 years; the legacy CLI has since been replaced by the craft-based rewrite. | |
| #1904197 snapcraft list-revisions requires a base in the API payload | snapcraft (launchpad) | closed | Abandoned after 2127 days. The issue reported a crash in snapcraft list-revisions when the API returned a null base value, violating schema validation. No fix or follow-up was provided. | |
| #1664704 snapcraft release gives misleading error when revision does not exist | snapcraft (launchpad) | open | snapcraft release shows misleading error suggesting 'snapcraft register' when the real problem is a non-existent revision. Filed 2016, 0 comments, no maintainer interaction; legacy CLI since replaced by craft-based rewrite. |