← Back to issue list

error message for desktop file problems does not include how to fix them

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1727435
Type
issue
State
open
Author
~elopio
Labels
bitesize ui
Created
Updated
Closed
—

Current evaluation

UI request (2017): errors.DesktopFileError gives no guidance on how to fix desktop-file problems. Still true for the two remaining cases (file not found, missing 'Desktop Entry'); the missing-Exec case was dropped in ea842ae55.

Suggested action: keep open

Reason: The core request is still unmet in HEAD: errors.py:71 `DesktopFileError.__init__` formats only `f"Failed to generate desktop file {filename!r}: {message}"` with no `resolution=`, and both remaining call sites (snapcraft/parts/desktop_file.py:57 'file does not exist (defined in app ...)' and :125 "missing 'Desktop Entry' section") still pass a bare message. The maintainer's own guidance in kyrofa's 2017-11-13 comment (split into per-case exceptions in snapcraft/internal/meta.py) still maps cleanly onto today's snapcraft/parts/desktop_file.py, and the codebase already has the exact pattern to copy in errors.py:76 `FilePermissionError(..., resolution=...)`. Only one of the three listed cases changed: the 'missing Exec' error no longer exists after commit ea842ae55 ('fix: allow desktop files without an Exec key', PR #6298), which narrows but does not resolve the issue. Issue is labeled bitesize/ui with maintainer (elopio) involvement and clear scope, so it stays open rather than being closed.

Evaluated by: mr-cal-bot

Impact: 22 Quick Win: 13 Complexity: 15 Confidence: 85 Actionability: 72

Issue body

When trying to make a snap, but there's an error in the desktop file, the same exception is raised for all the possible errors: - file does not exist - missing 'Desktop Entry - missing 'Exec' key This exception only mentions the problem, but doesn't explain how to fix it. To add this information, we need to either split the exception, one for each case, or add a field for the information about the fix.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 22
Quick Win: 13
Complexity: 15
Confidence: 85
Actionability: 72
keep open UI request (2017): errors.DesktopFileError gives no guidance on how to fix desktop-file problems. Still true for the two remaining cases (file not found, missing 'Desktop Entry'); the missing-Exec case was dropped in ea842ae55.
stealth/space-bunny-alpha
Impact: 27
Quick Win: 15
Complexity: 22
Confidence: 82
Actionability: 70
keep open DesktopFileError for missing desktop file / missing '[Desktop Entry]' section lacks a 'resolution' hint on how to fix; the third case (missing 'Exec') is now allowed since PR #6298. Triaged by kyrofa.
qwen/qwen3.6-35b-a3b
Impact: 20
Quick Win: 13
Complexity: 10
Confidence: 80
Actionability: 70
keep open Improve error messages for desktop file validation to include fix guidance. Partially addressed by PR #6298 (Exec key no longer required).
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22
Staleness: 92
Complexity: 25
Confidence: 55
Support Request: 5
needs triage Snapcraft raises the same generic exception for all desktop file errors (missing file, missing 'Desktop Entry', missing 'Exec' key) without explaining how to fix each. Suggests splitting the exception or adding a fix-hint field. Open since 2018, no comments, no maintainer response, unlabelled beyond bitesize/ui.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 10
close stale Desktop file validation errors during snap builds lack actionable fix instructions. Suggests splitting exceptions or adding fix details. Unchanged for over 8 years with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
close stale Request to improve error messages for desktop file validation in snap builds. Issue has been inactive for over 8 years with no maintainer response or updates.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 80
Support Request: 10
needs triage Desktop file validation errors during snap builds lack actionable fix instructions. Suggests splitting exceptions or adding fix details. Currently untriaged and inactive for over eight years.

Update history

Date Change
created

Related work

  • Related To: canonical/snapcraft#5799 (confidence 80%)

    That issue's 'missing Exec key' rejection was fixed by commit ea842ae55 (PR #6298); tests/unit/parts/test_desktop_file.py::test_missing_exec_entry now documents Exec as optional, so that sub-case of this issue no longer applies.

Related issues

No related issues found above the similarity threshold.