'snap find' no longer lists all available snaps

Bug #1609368 reported by Petter Adsen on 2016-08-03
This bug affects 6 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)

Bug Description

  Installed: 2.11+0.16.04
  Candidate: 2.11+0.16.04
  Version table:
 *** 2.11+0.16.04 500
        500 http://no.archive.ubuntu.com/ubuntu xenial-proposed/main amd64

Output from 'snap find':
error: cannot list snaps: empty query

This used to list all available snaps, but in the version from proposed this seems to no longer work. According to the man page it should:

       Finds packages to install

       The find command queries the store for available packages.

       Usage: snap [OPTIONS] find [find-OPTIONS]

AIUI, [...] means "optional", so keywords should not be needed.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: snapd 2.11+0.16.04
ProcVersionSignature: Ubuntu 4.4.0-33.52-generic 4.4.15
Uname: Linux 4.4.0-33-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: i3
Date: Wed Aug 3 13:48:50 2016
InstallationDate: Installed on 2015-06-12 (418 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422.1)
SourcePackage: snapd
UpgradeStatus: Upgraded to xenial on 2016-02-29 (155 days ago)

Petter Adsen (ducasse) wrote :
John Lenton (chipaca) wrote :

There seems to be an issue with it not being displayed as required in the help output. For now at least it _is_ required.

There is another issue about the error message being unclear.

"snap find" without arguments has not shown "all available snaps" in quite a while; it would show 100 arbitrary snaps. That is expensive and never what the user wanted, so in 2.11 we stopped doing that.

Petter Adsen (ducasse) wrote :

As to "never what the user wanted", I beg to differ - it was _exactly_ what I wanted :) 'apt list' will list all available packages, I expected 'snap find' to behave in a similar matter.

If this feature is now gone, that is sad IMHO. I hope at least the documentation can be updated to reflect this.

Is there anywhere else a complete list of available snaps can be found?

Petter Adsen (ducasse) wrote :

Update: 'snap find .' works, so the immediate problem is solved. Still, if 'apt list' can return 50k+ packages, I don't see why 'snap find' can't return 100.

John Lenton (chipaca) wrote :

It isn't that we can't do it; it's that it's a lot of work to do it properly, and there isn't a clear need. 'snap find .' will still only give you an arbitrary set of 100 packages.

'apt list' is a local query; 'snap find' is a remote one. Having 'snap find' return all snap packages is expensive, both on server resources (to get, collate and serialise everything), network bandwidth (to transmit the dump), and client resources (to display all of that). It would also force us to support pagination of the store queries in snapd, and of snapd respones in the client (as well as making supporting caching a higher-priority issue), which is a lot of work for a use case that is not at all clear is that interesting.

Especially considering that the (ubuntu) store has a public, documented REST API you can query directly if you absolutely need the list of snaps for some reason. http://search.apps.ubuntu.com/docs/#snap-specific-endpoints

We'll probably bring back empty "snap find" as part of the discovery story, but that's down the road a while.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Bruno Nova (brunonova) wrote :

Glad to see I'm not the only one!

There definitely needs to be a way to get the list of all snaps. I was running "snap find" every few days to see what new packages were available.
The Software Center doesn't have a filter to show only snaps, and uappexplorer doesn't show all of the snaps, at least for me.

Exeleration-G (exeleration-g) wrote :

Yes, there may have been some traffic from OMG Ubuntu!: http://www.omgubuntu.co.uk/2016/08/command-sudo-snap-find-error-not-a-bug

Changed in snapd (Ubuntu):
importance: Undecided → High

We will definitely provide lists of newest snaps - that can be cached
and fast.


Michael Vogt (mvo) wrote :

With the latest snapd the "snap find" command now returns a list of featured snaps. I really like the idea of having something like `snap find --freshest` (or --newest). But that would be a separate (whishlist) bug :)

Changed in snapd (Ubuntu):
status: Confirmed → Fix Committed
Mark Shuttleworth (sabdfl) wrote :

We could have 'latest' as a psuedo-category, easily enough.


Michael Vogt (mvo) on 2017-01-26
Changed in snapd (Ubuntu):
status: Fix Committed → Fix Released
Norbert (nrbrtx) wrote :

On my Xenial system `snap find` returns only 17 snaps:

$ snap find
Name Version Developer Notes Summary
skype skype classic One Skype for all your devices. New features. New look. All Skype.
slack 3.0.5 slack classic Team communication for the 21st century.
spotify spotify - Music for everyone
node-red 0.17.5 dcj - A visual tool for wiring the Internet of Things
mumble 1.2.19 snapcrafters - Mumble is an open source, low-latency, high quality voice chat software.
simplenote v1.1.2 snapcrafters - The simplest way to keep notes.
supertuxkart 0.9.3 diddledan - SuperTuxKart is a free kart racing game
get-iplayer 3.12 snapcrafters - CLI for downloading content from BBC iplayer
polarr 4.4.5-1 polarrco - Powerful and easy-to-use photo editor.
auryo 1.4.3 snapcrafters - Auryo
inkscape 0.92.2 inkscape - Vector Graphics Editor
hiri hiri - The email app for Exchange and Office 365
minetest 0.4.16 snapcrafters - Minetest
offlineimap 7.1.5 snapcrafters - OfflineIMAP
wekan 0.73 xet7 - The open-source Trello-like kanban
vectr 0.1.15 vectr - Vectr is a free graphics editor used to create vector graphics easily and intuitively.
simplyfortran 2.41.2546 approximatrix - Simply Fortran 2

But snapweb show more.

Please make `snap find` more useful.

Perry Hutchison (pch1) wrote :

In 16.04, "snap find ." says
  No matching snaps for "."

The link given for the REST API documentation gives a 403 error.

I question the assertion that returning a list of all snap packages would require pagination in the snap client. Pagination is what tools like "less" are for! Like this (supposing that there were in fact a way to retrieve the complete list):

$ snap find --all | less

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers