snap download can't find snaps from a branded store

Bug #1661436 reported by Tony Espy
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Low
Unassigned

Bug Description

If I try to download a gadget or kernel snap and its supporting assertions using 'snap download' on a Dell Gateway 5000 running Ubuntu Core 16 (snapd == 2.21), the command returns:

Fetching snap "stlouis"
error: cannot find snap "stlouis": snap not found

Note, the kernel and gadget snaps live in a branded store. This doesn't seem to be an issue for 'snap install' or 'snap refresh'.

The same error happened for another snap in related branded store that's only been published to edge. Even if I specify --edge on the download command, this snap isn't found either, yet I can install it using 'snap install --edge'.

Tony Espy (awe)
summary: - snap download can't find snaps from a branded store
+ snap download can't find gadget or kernel snap from a branded store
Tony Espy (awe)
description: updated
summary: - snap download can't find gadget or kernel snap from a branded store
+ snap download can't find snaps from a branded store
Tony Espy (awe)
description: updated
description: updated
Revision history for this message
Oliver Grawert (ogra) wrote :

there were connectivity issues with the store yesterday, could that be related ? (did the other snaps download ?)

Revision history for this message
Simon Fels (morphis) wrote :

Reason for this is that "snap downlaod" doesn't configure any specific store or authentication parameters for its access to the store at https://github.com/snapcore/snapd/blob/master/cmd/snap/cmd_download.go#L117

Both are required to download snap from private stores.

Revision history for this message
Simon Fels (morphis) wrote :

there is still a workaround I think, by doing a snap install on an existing system and fetching relevant things from /var/lib/snapd manually, not nice but a workaround

Revision history for this message
Simon Fels (morphis) wrote :

I've pushed a PR to allow the user specifying a store ID for the snap download command via a --store-id=<ID> argument. See https://github.com/snapcore/snapd/pull/2818

This doesn't yet respect authentication.

Michael Vogt (mvo)
Changed in snapd:
status: New → In Progress
Changed in snappy:
status: New → In Progress
Revision history for this message
Tony Espy (awe) wrote :

@Michael

As Simon pointed out in comment #4, his workaround will only work if the private store hasn't enabled authentication. I think long term, 'snap download' needs to be re-worked to use snapd directly for downloads, which would allow proper store authentication to occur.

Changed in snapd:
status: In Progress → Triaged
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I believe there's ongoing work on allowing "snap download" to take advantage of snapd's cache and configuration, including the branded store.

I can find the following pull request that is related to this problem

https://github.com/snapcore/snapd/pull/7624

I'm marking it as in progress and assigned to mvo.

no longer affects: snappy
Changed in snapd:
status: Triaged → In Progress
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This bug is still in progress. I believe it has lower priority than before due to the current focus on various ubuntu core 20 topics.

Changed in snapd:
importance: Undecided → Low
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The updated URL is https://github.com/snapcore/snapd/pull/7977 but it is closed.

Changed in snapd:
assignee: Michael Vogt (mvo) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.