Failed to download pc-kernel snap

Hi there,

This morning we run into an issue while trying to download pc-kernel snap. It seems the snap file was downloaded 100% but returned an 404 error. Please let me know if any logs are required for troubleshooting. Thanks.

Fetching snapd
Fetching pc-kernel 100% 4.31MB/s 0.0ns
error: received an unexpected http response code (404) when trying to download
COMMAND FAILED: snap prepare-image --channel=beta --snap=xxxxx=latest/beta --snap=docker=latest/stable xxxxx.assert /tmp/tmpelipao2v/unpack

there seems to currently be an issue with the store, see


Hmm, still seeing the error message. Now the status is green. :slight_smile: Got some logs from curl command, sorry for the off-format:

curl -Iv

  • Trying…
  • Connected to ( port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
  • TLSv1.2 (IN), TLS handshake, Server key exchange (12):
  • TLSv1.2 (IN), TLS handshake, Server finished (14):
  • TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
  • TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.2 (OUT), TLS handshake, Finished (20):
  • TLSv1.2 (IN), TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
  • ALPN, server did not agree to a protocol
  • Server certificate:
  • subject:
  • start date: Feb 15 14:50:43 2021 GMT
  • expire date: May 16 14:50:43 2021 GMT
  • subjectAltName: host “” matched cert’s “
  • issuer: C=US; O=Let’s Encrypt; CN=R3
  • SSL certificate verify ok.

HEAD /api/v1/snaps/download/pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza_726.snap HTTP/1.1 Host: User-Agent: curl/7.68.0 Accept: /


When I downloaded the snap file with wget command, it redirected to another location, not sure if ubuntu-image can follow the redirect:

–2021-03-16 10:02:54--
Resolving (…,,, …
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 302 FOUND
Location: [following]
–2021-03-16 10:02:56--
Resolving (…,
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 222167040 (212M) [application/octet-stream]
Saving to: ‘pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza_726.snap’

IIRC ubuntu-image just calls snap download (or the snapd API equivalent) internally …

It seems ubuntu-image runs snap prepare-image x.assert /tmp/xxx and failed with 404. I also gave the command snap download a try and it can download the pc-kernel snap file.

@ogra, thanks for the updates. After snapcraft login, the snap pc-kernel can be built in the image, but still not sure why it required login first for the public snap pc-kernel.

export UBUNTU_STORE_AUTH_DATA_FILENAME=xxx helps. I took a look into the codes, and seems “newToolingStore” function may need more logs. Will follow up in launchpad :slight_smile: Thanks.

1 Like