Got a sha3-384 mismatch on first download


Just got an error trying to install a snap from the store:

$ sudo snap install series-ninja
error: cannot perform the following tasks:
- Download snap "series-ninja" (9) from channel "stable" (sha3-384 mismatch for "series-ninja":
but expected 

Not sure of what’s happening here. That was the very first download attempt, so there wasn’t any delta work taking place.

Looking at the logs, I see that there was a retry:

Jun  7 13:21:58 nomade /usr/lib/snapd/snapd[4087]: retry.go:47: DEBUG: Retrying
, attempt 2, elapsed time=2m26.641635007s

It looks like in that second attempt the downloaded content was corrupted. I haven’t yet tested that unexpected hash, but I bet it’s from a mutation of the real content. Makes me wonder if the CDN is mishandling range requests. :confused:

Trying once more, the download was restarted from the ground up and succeeded.

Please note that this snap will most likely be removed from the store soon.

Thanks for this report. Do you have more log content ? I ask because the code should do an automatic retry on HashError once. I wonder if this code did not work for some reason or if it really tried it two times and got a hash error in both cases (and if that is the case its interessting that your manual subsequent attempt worked).