Snaps unavailable for your architecture are effectively reported as not existing at all
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
Fix Released
|
Medium
|
Unassigned | ||
snapd |
Triaged
|
Medium
|
Unassigned | ||
snapd (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
The error message given when a certain snap exists for some architectures, but not yours, is identical to that for a snap that doesn't exist at all.
See, e.g.:
ubuntu@ubuntu:~$ uname -i
x86_64
ubuntu@ubuntu:~$ sudo snap install xyzzy-made-up-name
error: cannot install "xyzzy-
vs:
ubuntu@ubuntu:~$ uname -i
x86_64
ubuntu@ubuntu:~$ sudo snap install robotfindskitten
robotfindskitten 1 from 'petevg' installed
and
ubuntu@ubuntu:~$ uname -i
aarch64
ubuntu@ubuntu:~$ sudo snap install robotfindskitten
error: cannot install "robotfindskitten": snap not found
ubuntu@ubuntu:~$
It would reduce user confusion if in the second error, the message was something along the lines of:
error: cannot install "robotfindskitten": snap exists, but is not compatible with your architecture (aarch64)
Changed in snapd: | |
status: | New → Confirmed |
Changed in snapd (Ubuntu): | |
status: | New → Confirmed |
Changed in snapd (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → Medium |
Changed in snapstore: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Ideally the store would provide the required information. We get currently: /api.snapcraft. io/api/ v1/snaps/ details/ robotfindskitte n X-Ubuntu- Architecture: arm64 X-Ubuntu-Series:16 fields= =anon_download_ url,architectur e,channel, download_ sha3_384, summary, description, binary_ filesize, download_ url,icon_ url,last_ updated, license, package_ name,prices, publisher, ratings_ average, revision, screenshot_ urls,snap_ id,support_ url,title, content, version, origin, developer_ id,private, confinement channel==edge not-found" ,
"message" : "Snap 'robotfindskitten' (CDwOz6O4zGyVXL cHbxWx9K7XTGmZC Bye) has no published revisions in the given context." cHbxWx9K7XTGmZC Bye) has no published revisions in the given context."
"""
$ http --pretty=format --print b https:/
{
"error_list": [
{
"code": "resource-
}
],
"errors": [
"Snap 'robotfindskitten' (CDwOz6O4zGyVXL
],
"result": "error"
}
"""
As a workaround we do it with the current store responses. Then we would have to do an additional http request that omits "X-Ubuntu- Architecture" after each 404. If this extra request did not give us a 404 we can print the nicer error message. But it would be preferable to have this from the store directly.