← Back to issue list

Obscure error message from snapcraft release when not logged in correctly

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1856502
Type
issue
State
open
Author
~robert-ancell
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft exposed a raw 401 macaroon error from release; commit 8a854a8de (#3907) now gives invalid legacy credentials an actionable login or export-login resolution.

Suggested action: close resolved

Reason: Commit 8a854a8de (#3907), titled "store: improve error message for 401 error", directly addressed this report. Current code catches Store 401 responses and raises StoreCredentialsUnauthorizedError with a resolution to run snapcraft login or export-login, with unit coverage for legacy credentials.

Evaluated by: mr-cal-bot

Impact: 32 Quick Win: 24 Complexity: 20 Confidence: 98 Actionability: 95

Issue body

$ snapcraft release test-channels_1.0_amd64.snap 1 stable Received 401: The request is missing an Authorization header field containing a valid macaroon I think my macaroon was probably invalid. I would have expected an error more like: "Failed to authorize with Snap Store, please try again with 'snapcraft login'" After doing a snapcraft login it worked.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 32
Quick Win: 24
Complexity: 20
Confidence: 98
Actionability: 95
close resolved Snapcraft exposed a raw 401 macaroon error from release; commit 8a854a8de (#3907) now gives invalid legacy credentials an actionable login or export-login resolution.
stealth/space-bunny-alpha
Impact: 28
Quick Win: 20
Complexity: 18
Confidence: 94
Actionability: 88
close resolved Snapcraft 3.8 exposed a raw 401 macaroon error during release; merged PR #3907 later added credential-specific login guidance, and the release command was removed.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 23
Complexity: 28
Confidence: 98
Actionability: 90
close resolved Unauthorized store requests during release previously lacked useful guidance; current Snapcraft handles 401 responses with explicit login or credential-refresh instructions.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 30
Staleness: 90
Complexity: 15
Confidence: 70
Support Request: 10
needs triage snapcraft release prints an obscure 401 macaroon error when not logged in; user suggests a friendlier message pointing to 'snapcraft login'. No labels, no comments, ~6.5 years inactive. Same problem class tracked in craft-store#97 and LP 1834469.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 24
Staleness: 92
Complexity: 30
Confidence: 75
Support Request: 15
needs triage Request to improve the obscure 401 'missing a valid macaroon' error from snapcraft release when not logged in, suggesting a message pointing to snapcraft login. 6.7 years old, unlabelled, no maintainer response; same problem class tracked in craft-store#97.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 40
close stale User reports an obscure 401 error message from snapcraft release when not logged in, suggesting a more user-friendly error message. Issue is 6+ years old with no activity.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 5
Confidence: 90
Support Request: 10
close stale Suggests a clearer error message when snapcraft release fails due to invalid authentication. The issue has been inactive for over 6 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 20
close stale Request to improve error messaging when snapcraft release fails due to invalid or missing authentication credentials. Currently unlabelled and inactive for over six years.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#3907 (confidence 99%)

    Commit 8a854a8de implements the actionable invalid-credentials error requested by the issue.

Related issues

Issue Project State Summary Similarity
#1930592 Handle macaroon-authorization-required error response snapcraft (launchpad) open Snapcraft whoami bypasses the 401 re-login wrapper and shows a generic store error for missing or expired credentials; the open report remains valid and is linked to an unresolved craft-store bug.
77%
#1622635 Cryptic error message for store access failure. snapcraft (launchpad) closed Request for a clearer 401 error suggesting 'snapcraft login' was closed as unnecessary after PR canonical/snapcraft#903 (commit 603948e1d) removed the login requirement for Store part downloads, fixing LP #1606903.
75%
#1748802 `snapcraft login` authentication failure message could be friendlier snapcraft (launchpad) closed Fixed by merged PR snapcore/snapcraft#1936 (commit 688588a0d), which made the store API surface server-supplied error text, so login failures now read "Authentication error: Failed to get unbound discharge: Provided email/password is not correct."
74%
#1980534 Legacy credentials in Snapcraft 7 give a confusing error message snapcraft (launchpad) closed Fixed legacy-credential logout handling in snapcore/snapcraft#3921 (commit c3d4c8999), allowing stale credentials to be cleared and login retried.
72%
#1699232 Incorrect error message when the store returns 400 on login snapcraft (launchpad) closed Fixed as a side effect of snapcore/snapcraft#1936: Snapcraft now displays messages returned by the store instead of labeling every 400 login response as an incorrect password.
72%
#1834469 error messaging for invalid macaroon could be improved snapcraft (launchpad) open Expired legacy credentials can still yield a raw macaroon error or block login; newer 401s are actionable, but the legacy path and upstream craft-store report remain unresolved.
72%
#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.
71%
#6098 fix: Tweak error message about SNAPCRAFT_STORE_CREDENTIALS snapcraft merged Merged in commit ee69b79b1, clarifying that login cannot be used while SNAPCRAFT_STORE_CREDENTIALS is set and removing ambiguous wording.
71%
#1843404 snapcraft export-login doesn't provide meaningful error messages when an argument is wrong snapcraft (launchpad) 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.
70%
#1980533 Suggests regenerating credential without telling you how snapcraft (launchpad) open Credential-error message lacked regeneration instructions; now Snapcraft's 401/candid errors tell users to run 'snapcraft login'/'export-login' (fixed in commit 8a854a8de, PR #3907).
70%