← Back to issue list

Confusing error message on expired macaroon

View original Github issue

Metadata

Project
craft-store
Number
#97
Type
issue
State
open
Author
sergiusens
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

Expired macaroon yields misleading store errors (macaroon-permission-required / macaroon-authorization-required). Triaged bug; maintainer proposed a client-side expiry check; confirmed reproduced but still unfixed.

Suggested action: keep open

Reason: The issue is a valid, maintainer-acknowledged UX bug: sergiusens (a maintainer) triaged it and proposed a concrete approach ('We can do a client side check for the expiration date to provide a potentially better error message', with the jq/base64 snippet for decoding the `.v` field), and AliyevH independently reproduced it with a 2-minute expiry. There is no evidence of a resolving commit or PR in craft-store, and the related launchpad bug snapcraft#1834469 explicitly notes craft-store#97 is still open, so it should remain open. Impact is moderate — the upload/login still fails, but only the message is misleading (no data loss), and it wastes significant user time across the craft toolchain; confidence is capped slightly below 90 because repository source was not inspectable in this round (tooling returned 'No pinned SHA available'), so I could not confirm the current login/credential-store code lacks an expiry check.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 18 Complexity: 40 Confidence: 78 Actionability: 70

Issue body

### Bug Description After a macaroon expires, you start seeing error messages like ![image](https://github.com/canonical/craft-store/assets/1146853/08652a74-ebad-4151-952e-7b54b97de4ab) ### To Reproduce Login, wait for macaroon to expire, upload. ### part yaml _No response_ ### Relevant log output ```shell - macaroon-permission-required: Package-restricted permission does not include snap-id ..... ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 42
Quick Win: 18
Complexity: 40
Confidence: 78
Actionability: 70
keep open Expired macaroon yields misleading store errors (macaroon-permission-required / macaroon-authorization-required). Triaged bug; maintainer proposed a client-side expiry check; confirmed reproduced but still unfixed.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 40
Confidence: 70
Actionability: 70
keep open Improve error messages when macaroon expires. Maintainer suggested client-side expiration check. Status: Triaged, open, no fix yet.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21
Staleness: 65
Complexity: 40
Confidence: 70
Support Request: 10
keep open craft-store shows a confusing 'macaroon-permission-required' error when store credentials expire instead of telling users to re-login. Triaged by a maintainer with a Jira ticket (CRAFT-3385), but no code work; last activity ~11 months ago.
qwen/qwen3.6-35b-a3b
Staleness: 60
Complexity: 25
Confidence: 85
Support Request: 10
keep open Improving error messaging for expired store credentials. The issue is triaged, acknowledged by a maintainer, and scoped as a bug, but has seen no activity for ~10 months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 25
Confidence: 80
Support Request: 5
keep open Triaged bug reporting a confusing error message when a macaroon expires. Maintainer suggested a client-side check, but no implementation or follow-up in nearly a year.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1834469 (confidence 88%)

    Open launchpad bug 'error messaging for invalid macaroon could be improved' whose summary explicitly states that expired legacy credentials still produce misleading macaroon errors and that craft-store#97 is open.

  • Related To: snapcraft (launchpad)#1745264 (confidence 75%)

    Closed launchpad bug 'error message for expired macaroon is not helpful' — resolved on the snapcraft side via merged PR #3562 (54781044a), implying partial downstream improvement but no corresponding fix in craft-store.

Related issues

Issue Project State Summary Similarity
#1745264 error message for expired macaroon is not helpful snapcraft (launchpad) closed Expired or invalid macaroon errors were improved in PR #3907, merged as commit 8a854a8de.
84%
#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.
80%