← Back to issue list

Cryptic error message for store access failure.

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1622635
Type
issue
State
closed
Author
~mabnhdev
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed superseded

Reason: Closed by @sergiusens (2016-11-15) with the note that LP #1606903 was fixed, making it no longer necessary. That fix came from merged PR canonical/snapcraft#903 (commit 603948e1d, 'store: download without login'), which made Store part pulls work without credentials instead of merely rewording the 401 message.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I'm using the latest snapcraft and snapd (2.16 and 2.14.2~16.04 respectively). When snapcraft tries tries to download ubuntu-core, I get the following failure. The pull failed because I was not logged into the Ubuntu store. After doing a 'snapcraft login' the build succeeded. The '401' message should be more clear - possibly suggest 'snapcraft login'. mberger@bldecos-1:/builds2/mberger/superbee/snappy-ecos$ snapcraft clean && snapcraft "grade" property not specified: defaulting to "stable" Searching for local plugin for x-kernel Skipping cleaning priming area for kernel (already clean) Skipping cleaning staging area for kernel (already clean) Skipping cleaning build for kernel (already clean) Skipping cleaning pulled source for kernel (already clean) "grade" property not specified: defaulting to "stable" Searching for local plugin for x-kernel Preparing to pull kernel Pulling kernel Cloning into '/builds2/mberger/superbee/snappy-ecos/parts/kernel/src'... remote: Counting objects: 56837, done. remote: Compressing objects: 100% (53459/53459), done. remote: Total 56837 (delta 5175), reused 20474 (delta 2542) Receiving objects: 100% (56837/56837), 157.59 MiB | 4.72 MiB/s, done. Resolving deltas: 100% (5175/5175), done. Checking connectivity... done. Checking out files: 100% (53696/53696), done. Getting details for ubuntu-core Downloading ubuntu-core 401 Client Error: UNAUTHORIZED for url: https://public.apps.ubuntu.com/download-snap/b8X2psL1ryVrPt5WEmpYiqfr5emixTd7_524.snap

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded 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.
stealth/space-bunny-alpha — closed superseded Closed as obsolete after PR #903 (commit 603948e1d) enabled store downloads without login, resolving LP #1606903.
stealth/space-bunny-alpha — closed stale Closed as abandoned without implementation: no clearer 401 guidance was added; snapcraft login was the workaround (Launchpad bug #1622635).
qwen/qwen3.6-35b-a3b — — Abandoned and closed without implementation. The report requested clearer error messaging for unauthorized store access failures, suggesting a prompt to run snapcraft login. No changes were made.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report of a cryptic 401 error for unauthenticated store access was abandoned due to inactivity, with no code changes or official fix implemented.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report detailed a cryptic 401 error when downloading snaps without authentication, requesting a clearer message. No comments or fixes were applied, indicating the issue was abandoned.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The request to improve the 401 authentication error message for missing store credentials was abandoned.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1606903 (confidence 95%)

    Prior Launchpad bug cited in the closing comment as the root cause now fixed by #903.

  • Superseded By: canonical/snapcraft#903 (confidence 92%)

    Merged commit 603948e1d 'store: download without login' removed the auth requirement that produced the cryptic 401.

  • Related To: canonical/snapcraft#3907 (confidence 60%)

    Much later merged PR (commit 8a854a8de) that did add a friendlier 401 error message, addressing the same underlying complaint decades later.

Related issues

Issue Project State Summary Similarity
#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.
75%
#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.
74%
#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%
#1560553 snapcraft error message is not very helpful when using storeapi without being logged in snapcraft (launchpad) closed Improved the store API error shown when users were not logged in via ubuntu-core/snapcraft PR #408.
74%
#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.
74%
#5536 fix(store): catch credential decoding errors snapcraft merged Merged in canonical/snapcraft#5536 (commit 3784560f3), converting malformed store credential decoding failures into a user-friendly error and updating craft-store.
72%
#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.
71%
#1542476 snapcraft upload forbidden for user without signed agreement snapcraft (launchpad) closed Closed as won't fix: 'snapcraft upload' returned Forbidden for users lacking a signed store agreement. By 2017 store login enforced the terms and namespace, so the error was no longer reachable.
70%