← Back to issue list

Passing --store has weird syntax/requirements and user-facing error is not informative

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1899033
Type
issue
State
open
Author
~roadmr
Labels
Created
Updated
Closed

Current evaluation

2020 report that snapcraft register with --store failed with an uninformative 'Registration failed' error; the mangled store value in the payload matches a zero-width space in the reporter's own pasted command. No maintainer response in ~6 years; snapcraft 4.3 is long out of support.

Suggested action: close stale

Reason: The issue is ~6 years old (last activity 2082 days ago) with 0 comments, no labels, and no maintainer engagement, and targets snapcraft 4.3 on Ubuntu 18.04, which is long out of support in a since-rewritten craft-based codebase. Notably, the payload's "store": "\u200bgltNg0wohVae8aY4" matches the zero-width space (U+200B) visible in the reporter's own pasted command, so the 'parsing' complaint is likely user input rather than a snapcraft bug, and the remaining error-message nit has a documented workaround (--store=).

Impact: 20 Quick Win: 14.0 Staleness: 95 Complexity: 30 Confidence: 60 Support Request: 30

Issue body

Trying to register a snap on a brand store for which I am a publisher (I have obfuscated the store ID and snap names). $ snap run snapcraft register --store ​gltNg0wohVae8aY4 --yes does-this-look-correct Registering does-this-look-correct. Registration failed. Let's look at what the HTTP dialog shows (macaroon elided). First problem: this requires hacking snapcraft as there doesn't seem to be a switch to enable this verbose debugging (SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes --debug don't do the trick). $ cp /snap/snapcraft/current/bin/snapcraft /tmp/snapcraft $ sed -i '5iimport http.client\nhttp.client.HTTPConnection.debuglevel = 1\n' /tmp/snapcraft $ sudo mount -o bind /tmp/snapcraft /snap/snapcraft/current/bin/snapcraft $ snap run snapcraft register --store ​gltNg0wohVae8aY4 --yes does-this-look-correct Registering does-this-look-correct. send: b'POST /dev/api/register-name/ HTTP/1.1\r\nHost: dashboard.snapcraft.io\r\nUser-Agent: snapcraft/4.3 Ubuntu/18.04 (amd64)\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Macaroon root=<my root macaroon>, discharge=<my discharge>\r\nContent-Type: application/json\r\nContent-Length: 130\r\n\r\n' send: b'{"snap_name": "does-this-look-correct", "is_private": false, "series": "16", "store": "\\u200bgltNg0wohVae8aY4"}' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Date: Thu, 08 Oct 2020 13:13:31 GMT header: Server: gunicorn/19.7.0 header: Content-Type: application/json <boring headers> header: Connection: close header: Transfer-Encoding: chunked Registration failed. Second problem: Snapcraft's response on a 400 reply from the store is too terse to be useful. OK, so looking at the post payload, the store name is borked: "store": "\\u200bgltNg0wohVae8aY4" Looks like snapcraft is not properly parsing the --store command-line parameter value. Let's try this: $ snap run snapcraft register --store=gltNg0wohVae8aY4 --yes does-this-look-correct Registering does-this-look-correct. send: b'POST /dev/api/register-name/ HTTP/1.1\r\nHost: dashboard.snapcraft.io\r\nUser-Agent: snapcraft/4.3 Ubuntu/18.04 (amd64)\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Macaroon root=<root>, discharge=<disch>\r\nContent-Type: application/json\r\nContent-Length: 124\r\n\r\n' send: b'{"snap_name": "does-this-look-correct", "is_private": false, "series": "16", "store": "gltNg0wohVae8aY4"}' reply: 'HTTP/1.1 201 Created\r\n' header: Date: Thu, 08 Oct 2020 13:14:35 GMT header: Content-Language: en header: Content-Type: application/json header: X-VCS-Revision: 8ee7d2f < A bunch of boring headers elided> Congrats! You are now the publisher of 'does-this-look-correct'. This is the third issue. It's workaroundable by using --store=, we can use that in the meanwhile but it would be great if snapcraft would properly parse command-line options. I realize in hindsight this is an omnibug. Let me know if you'd prefer I file all 3 issues separately, I can gladly do it.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14.0
Staleness: 95
Complexity: 30
Confidence: 60
Support Request: 30
close stale 2020 report that snapcraft register with --store failed with an uninformative 'Registration failed' error; the mangled store value in the payload matches a zero-width space in the reporter's own pasted command. No maintainer response in ~6 years; snapcraft 4.3 is long out of support.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 0
close stale Bug report from 2020 regarding uninformative errors and CLI parsing issues when using --store with a space instead of =. Targets EOL snapcraft 4.3/Ubuntu 18.04. No updates in over 5 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 15
close stale snapcraft register --store fails with uninformative errors when the store ID contains hidden characters. No maintainer response, inactive for over 5 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 10
close stale Untriaged report from 2020 regarding snapcraft CLI argument parsing and unhelpful error messages during snap registration. The issue remains completely inactive with zero maintainer engagement or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 25
Confidence: 70
Support Request: 10
close stale snapcraft register --store fails with unhelpful errors when using space-separated syntax due to invisible Unicode characters. Workaround requires --store= syntax. Needs improved CLI parsing and better error messages. Open, awaiting triage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1886223 snapcraft recommends bad naming standards snapcraft (launchpad) open Reports that the snapcraft register CLI prompt implied third parties couldn't publish snaps and suggested username suffixes, contradicting store naming docs. No maintainer response; the referenced register command/prompt no longer exists in current snapcraft.
70%