snap does not resume unfinished downloads

Bug #1790964 reported by Rolf Leggewie
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Undecided
Unassigned

Bug Description

I am on bionic and just attempted to install skype on a flakey internet connection.

$ sudo snap install skype --classic

For some reason, the connection was always interrupted half-way through (well, that happens, I guess). What should not happen is for snap to restart the download from 0. It should pick up where it left off.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Dan Watkins (oddbloke) wrote :

Yep, I'm hitting a similar problem. I'm trying to install the spotify snap on a library wifi connection that only gives me ~250kB/s and it's going to take about a quarter hour. That makes using the connection for _anything else_ painful, but I can't interrupt the snap download without losing all the progress I've made.

Revision history for this message
John Lenton (chipaca) wrote :

Dan, if the download you are referring to is a refresh, note you can rate limit *auto*-refreshes (that is, non-interactive refreshes) via `snap system set refresh.rate-limit <some limit>`. For interactive refreshes and installs, you can replace them with a `snap download` followed by a `snap ack` and a `snap install`, and `snap download` will leave a .partial file if you interrupt it.

The problem with having snapd itself leave a partial file when the user has explicitly cancelled a manual install or refresh is that it's impossible to know when leaving the partial is the right thing to do. There are a couple of ideas going around as to how we _could_ make this better, but there's no solid way of doing it, they're both fiddly, and fall apart in some situations meaning there'd have to be a way of tuning the behaviour, which just makes the whole thing a mess.

Revision history for this message
Daniel Manrique (roadmr) wrote :

See https://forum.snapcraft.io/t/refreshing-downloading-a-snap-over-a-poor-connection/15350/5, looks like snapd is still not resuming downloads in situations where it should (unexpected connection interruptions).

affects: snapd (Ubuntu) → snapd
Revision history for this message
Svet Bajlekov (svetb) wrote :

Just to follow up on my comments in the thread that @roadmr linked to, I can confirm that with 2.43.3, downloads resumption *is* possible using snap download, but does *not* currently appear to be implemented for snap refreshes (either automatic ones, or those triggered manually).

Looking at the codebase, I can see a few recent commits/PRs that appear to progress this, e.g.: https://github.com/snapcore/snapd/pull/8078, https://github.com/snapcore/snapd/pull/8119

Would be great to get an update on the current status and plan forward on this.

Thanks to all the developers (esp. @mvo) for the work clearly going into this!

Revision history for this message
vr25 (vr25) wrote :

I'm "using" the latest snapd (just checked for update before writing this).
The issue persists.
`snap install <package>` does not resume downloads, nor does `snap refresh` (including auto-refresh).
`snap download <package>` does resume downloads, but as far as I know, it won't download delta updates (sad).
I'm on a remote area and my internet connection is very unstable and slow (~64kB/s down, ~20ish kB/s up).
`apt` works fine, though.
Unfortunately, until this issue is fixed, I can't really use snaps.

Revision history for this message
James (james-e-steward) wrote :

I'm using an up to date Ubuntu 20.04 install and apt reports;
$ apt info snapd
Package: snapd
Version: 2.48.3+20.04

I'd like snap download to be able to resume a download even after I've manually killed it with Ctrl-c and then restart some time later.

I'm trying to install gimp, and the connection here is slow. A snap install has failed twice, and now I'm trying download.

I'd like to be able to stop and resume a download because at times I might start and then want to stop to use the internet connection for something else - without the added traffic of the download.

I agree with vr25.

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

Other bug subscribers

Remote bug watches

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