Comment 1 for bug 2001725

Revision history for this message
Guillermo Gonzalez (verterok) wrote (last edit ):

Thanks for reporting this.

Will state some facts/findings related to this for the next one looking at it.:

The snap is marked as unlisted.

snap info not showing it, needs further investigation.

This seems to be a problem related to the unpublishing from all channels, as vscode had releases at some point. Now the revisions are still there but the channels were cleared to prevent installs from this snap.

❯ curl -XPOST -H "Snap-Device-Architecture: amd64" -H "Snap-Device-Series: 16" -s https://api.snapcraft.io/v2/snaps/refresh -H 'Content-type: application/json' -d '{ "context": [], "actions": [{"name": "vscode", "channel": "stable", "action": "install", "instance-key": "a-test"}]}' | jq
{
  "error-list": [],
  "results": [
    {
      "error": {
        "code": "revision-not-found",
        "extra": {
          "releases": [
            {
              "architecture": "amd64",
              "channel": "candidate"
            },
            {
              "architecture": "amd64",
              "channel": "beta"
            },
            {
              "architecture": "amd64",
              "channel": "edge"
            },
            {
              "architecture": "i386",
              "channel": "candidate"
            },
            {
              "architecture": "i386",
              "channel": "beta"
            },
            {
              "architecture": "i386",
              "channel": "edge"
            }
          ]
        },
        "message": "No revision was found in the Store."
      },
      "instance-key": "a-test",
      "name": "vscode",
      "released-at": null,
      "result": "error",
      "snap": {
        "license": "Proprietary",
        "name": "vscode",
        "prices": {},
        "publisher": {
          "display-name": "Snapcrafters",
          "id": "eEoV9TnaNkCzfJBu9SRhr2678vzyYV43",
          "username": "snapcrafters",
          "validation": "unproven"
        },
        "snap-id": "XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM",
      },
      "instance-key": "a-test",
      "name": "vscode",
      "released-at": null,
      "result": "error",
      "snap": {
        "license": "Proprietary",
        "name": "vscode",
        "prices": {},
        "publisher": {
          "display-name": "Snapcrafters",
          "id": "eEoV9TnaNkCzfJBu9SRhr2678vzyYV43",
          "username": "snapcrafters",
          "validation": "unproven"
        },
        "snap-id": "XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM",
        "summary": "Code editing. Redefined.",
        "title": "Visual Studio Code"
      },
      "snap-id": "XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM"
    }
  ]
}

As shown above, the error is that there are no revisions, but the snap is there.

TODO: investigate if/how the store can reply an empty list of channels for cases like this and what snapd will/can do with that. (e.g: will it barf or just handle the revision-not-found as a snap-not-found?)

Just checked the DB and the channelmap entry for this snap has releases for edge/candidate/stable with no revision number specified...which looks wrong.
   id | snap_id | risk | architecture | status | created_at | revision | revoked
---------+----------------------------------+-----------+--------------+----------+----------------------------+----------+---------
  425662 | XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM | beta | amd64 | released | 2019-03-21 09:39:39.388708 | | f
  449016 | XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM | candidate | amd64 | released | 2019-04-11 15:27:11.20792 | | f
 1245605 | XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM | edge | amd64 | released | 2021-02-12 12:37:29.4956 | | f
  425663 | XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM | beta | i386 | released | 2019-03-21 09:39:39.388708 | | f
  187297 | XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM | candidate | i386 | released | 2018-05-16 15:48:12.578531 | | f
  449018 | XPQdduIwHiDCZvPHRrmsqV7Nr6nQRuqM | edge | i386 | released | 2019-04-11 15:27:26.660676 | | f

Will ask Daniel and William if they remember any reason for things to be like this and discuss a possible solution.