Snaps download should be resumable

I’m afraid you’re going to have to repeat the same thing with the ‘core’ snap, i.e. download it via some other means, rename it as snap download expects, and go from there.

Alternatively, if you’re feeling brave, I wrote the fix for this and while it’s not even in master yet you could grab the snap binary built from that branch, and run download using that. Something like

wget -O /tmp/snap.bz2 https://people.canonical.com/~john/snap__amd64__PR7315_download_leave_partial.bz2
bunzip2 /tmp/snap.bz2
chmod +x /tmp/snap
/tmp/snap download core
1 Like

Hello @chipaca

Thank you so much for your help. I finally able to install it in my computer.

joseph@joseph:~$ sudo snap install blender_33.snap --classic
Warning: /snap/bin was not found in your $PATH. If you've not restarted your session since you
         installed snapd, try doing that. Please see https://forum.snapcraft.io/t/9469 for more
         details.

blender 2.80 from Blender Foundation (blenderfoundation✓) installed

It gave me this warning though.

I launched the app. It’s bit slower. Not very smooth. Is that normal? Will it update without any problems?

Thank you so much for your help @chipaca :slight_smile:

Snaps can be quite a bit slower to start the first time (a few seconds of delay, 2-3 seconds in my tests), a little bit slower the following times (less than a second, ~200ms in my tests). Once it’s started it should not be any less smooth than without the snap.
Classic snaps should not suffer these problems, however, so I’m not sure what you’re experiencing.

As to whether it’ll update without problems – I don’t know. Probably not automatically, given no single download succeeds, but … maybe? updates use deltas, so as long as teh delta is small it might be able to get through (an update will retry a number of times before giving up, and that might be enough to progress even in the ~800k chunks your network seems to cut off at).

Ah… thanks @chipaca:slight_smile:

Blender is launching without any problem… But the problem is when working… It’s slower little bit. I’ve worked a little and restart my computer and it’s better than before. Still a little slower, but it’s not slow as before.

Will you guys fix that download problem? I’ve been using this internet connection for years. I didn’t have any problems downloading anything. It’ll be a big help for most of the people out there I think. :slight_smile:

Thank you so much for fixing my problem @chipaca:hugs:

The problem is seemingly specific to your network. Most other installations do not exhibit this issue so we can conclude that it is environmental. How is your network set up? Do you have any proxies? Do you have any firewalls? Are you running any containers or virtual machines which have their own network addresses?

No I don’t @daniel… This is very cheap internet package from my ISP. :blush:

I’ve never had a problem with apt. I update my system and applications without any problem. It keeps downloading. I download things from online web sites. Watch youtube videos. I never had any problem with that too. Only snap install cause this problem. :blush: But I had some help to fix it. I’m happy about it… :slight_smile:

Ah, I’m sorry, I’d understood you to say that you knew your network wasn’t good. If that’s not the case, then, that’s interesting!

We have very rarely seen cases where go’s http2 client and fastly’s http2 server get confused, and fastly sends a reset (which AIUI—but I’m no expert—is http2 for “me no habla gibberish”).

One way to test that would be by asking snapd (or snap download) to not talk http2. This obviously isn’t a good long-term solution, but would you be able to check by doing

GODEBUG=http2client=0 snap download sdlpop

(sdlpop is 29MB which should be enough to trigger the misbehaviour you’re seeing, but feel free to use something bigger if you think it’s needed)

Please let me know how that goes.

I can confirm this in Panamá using Debian 10, downloads are a pain if you only have a “very cheap internet package from my ISP.”

mario@rune:~$ snap version
snap    2.37.4-1+b1
snapd   2.37.4-1+b1
series  16
debian  10
kernel  4.19.0-13-amd64

this is a very old snapd version … debian systems should be capable of using reexec to the snapd of the core snap which should have a more recent version available, try to explicitly run:

snap install core

that should re-exec and snap version should show a higher version

allow me some time to do the downloads, I’ll follow-up asap. thank you for the hint.

core is around 100M, so it took its time, like 2h. now I have this:

mario@rune:~$ snap version
snap    2.48.2
snapd   2.48.2
series  16
debian  10
kernel  4.19.0-13-amd64

I’m with sudo snap install snapcraft and I see that:

  • if I interrupt the download manually, the partial download disappears (I wish it didn’t, or that it would ask me, or that there were a setting affecting this behaviour).
  • if I turn off the wifi for a while then on again, the download does not resume (after more than a minute but less than two I interrupted it manually, so the partial download again disappears).
  • if I link the file being downloaded to an extra different name, manually interrupting the download does not remove my new link, so I can hope to resume. renaming my new link to the partial download and restarting the download seems to append to the file, but the process percentage starts from 0%, which I consider misleading.

its now at 12%, I already created the new link that won’t be removed, let’s see how it goes.

apparently there was a glitch in my internet connection, making the download reset/restart/resume … something. it’s still proceeding in the sense that the .partial file keeps growing, but the percentage restarted at 0%, which is a bit confusing.
also: nethogs reports a RECEIVED value around 15KB/s, but snap’s status line reports around 4000B/s.

nope: this happened and the .partial file was removed

Download snap "snapcraft" (5821) from channel "stable"           5% 13.2kB/s 80.6m
error: cannot perform the following tasks:
- Download snap "snapcraft" (5821) from channel "stable" (unexpected EOF)

just for future reference, once you have manually downloaded a new core, and once you have stopped/unmounted all snap related mountpoints, you must first remove core before you can install it from the local .snap file.

This is not true, you should not have to do this, all you should have to do after downloading the new revision and .assert file with snap download is:

$ snap ack <core_something>.assert
$ snap install <core_something>.snap

as directed in the output from snap download:

$ snap download core
Fetching snap "core"
Fetching assertions for "core"
Install the snap with:
   snap ack core_10584.assert
   snap install core_10584.snap

you are correct, I do not know why I had to do that, and I can’t replicate the situation. my guess is that a slow internet connection causes more trouble than I can measure.