← Back to issue list

snapcraft export-login doesn't provide meaningful error messages when an argument is wrong

View original Launchpad issue

Metadata

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

Current evaluation

export-login masks Store 4xx/5xx details behind “Failed to get macaroon”; maintainer analysis confirms useful API errors are available, but no fix is evidenced.

Suggested action: keep open

Reason: Maintainer ~roadmr traced the behavior to a generic exception raised for every non-OK HTTP response and showed that API 404 payloads contain specific error details. The report provides an exact reproducer, expected output, implementation location, and an acknowledged edge case around non-application 500 errors; no resolving change is evident.

Evaluated by: mr-cal-bot

Impact: 36 Quick Win: 19 Complexity: 38 Confidence: 88 Actionability: 84

Issue body

Steps to reproduce: 1. Run ``` expiry_date='2020-09-10T00:00:00' acls='package_push,package_release,package_access' snap_name='firefox' snapcraft export-login --channels=esr --snaps="snap_name" --acls="$acls" --expires="$esr_macaroon_file ``` (Note there's a bug in the last command, "snap_name" instead of "$snap_name". 2. Fill the right credentials. Expected results: A meaningful error message like: "Server reported 'snap_name' is not a valid snap". Actual results: Just this error message is provided: "Authentication error: Failed to get macaroon". Context: I made this mistake after 2 successful macaroon exports. The lack of information lead me to think there was a bug around custom tracks. "ESR" was created in https://forum.snapcraft.io/t/firefox-please-create-the-track-esr/5006. I ended up filing a bug against the server: https://bugs.launchpad.net/firefox/+bug/1843275. Kudos to Daniel Manrique who gave me a simple way to debug what's happening. Although, I think error messages should provide more info by default.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 36
Quick Win: 19
Complexity: 38
Confidence: 88
Actionability: 84
keep open export-login masks Store 4xx/5xx details behind “Failed to get macaroon”; maintainer analysis confirms useful API errors are available, but no fix is evidenced.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 22
Complexity: 24
Confidence: 89
Actionability: 91
close resolved export-login now routes ACL failures through craft-store instead of returning the old generic macaroon error; the 2019 issue appears resolved.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 40
Confidence: 70
Actionability: 70
needs triage snapcraft export-login shows generic 'Authentication error: Failed to get macaroon' instead of meaningful error when invalid snap name is provided. No maintainer response or labels.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18
Staleness: 90
Complexity: 40
Confidence: 70
Support Request: 10
needs triage snapcraft export-login returns a generic 'Authentication error: Failed to get macaroon' instead of a meaningful message when an argument (e.g. snap name) is wrong. Unlabelled, zero comments, no maintainer interaction for ~7 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale CLI command snapcraft export-login returns a generic authentication error instead of a clear message for invalid arguments. Issue has been inactive for over six years with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 90
Support Request: 15
close stale Report requesting improved error messages for snapcraft export-login when invalid arguments are passed. Currently shows a generic authentication error instead of clarifying the invalid snap name. No maintainer response in over 6 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
close stale snapcraft export-login returns a generic authentication error instead of a specific validation message when an invalid snap name is passed. The issue has been inactive for nearly 7 years with no maintainer response.

Update history

Date Change
created

Related work

  • Related To: firefox#1843275 (confidence 94%)

    The reporter explicitly linked this context to a server-side report filed after export-login hid the API's specific 404 message.

Related issues

Issue Project State Summary Similarity
#4226 snapcraft export-login ignores expires parameter snapcraft closed Closed as stale without a Snapcraft fix. Maintainers attributed the short-lived macaroon to store-side refresh handling and later asked reporters to open a new ticket if the problem persisted.
74%
#1856502 Obscure error message from snapcraft release when not logged in correctly snapcraft (launchpad) open Snapcraft exposed a raw 401 macaroon error from release; commit 8a854a8de (#3907) now gives invalid legacy credentials an actionable login or export-login resolution.
70%