Error : HTTP status code 408 Snap Store

Thanks for replying.

I’m having the same error for more than a week now. Not having it on my Phone’s hotspot network. Only happening on the wireless broadband connection.

I started seeing the same errors early in the morning of 15 March and have not been able to make snap refresh work since. This is the error code:

$ sudo snap refresh
error: cannot refresh: cannot query the store for updates: got unexpected HTTP
       status code 408 via POST to "https://api.snapcraft.io/v2/snaps/refresh"

I also tried this:

$ snap debug connectivity
Connectivity status:
 * api.snapcraft.io: unreachable
error: 1 servers unreachable

But ping does work

$ ping -c1 -q api.snapcraft.io
PING api.snapcraft.io (185.125.188.60) 56(84) bytes of data.

--- api.snapcraft.io ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 13.506/13.506/13.506/0.000 ms

What is peculiar is that I have an lxc container which is set up to use a VPN and that works fine. Does this point the finger at my Internet connection? I have not knowingly changed anything to do with network configuration for a good while, and don’t have a firewall set up. I use the virginmedia ISP in the UK - do I need to make sure certain ports are open and/or being forwarded.

Any pointers / suggestions gratefully received.

If when installing a snap package you get:

... cannot query the store for updates: got unexpected HTTP
status code 408 via POST to "https://api.snapcraft.io/v2/snaps/refresh"

Example, when:

$ sudo snap installfirefox

Solution (download package with snap first and the install it):

$ sudo snap download firefox

$ sudo  snap ack firefox_1232.assert

$ sudo snap install firefox_1232.snap

My symptoms are identical to @mergwyn above. About the middle of March 2022 I stopped having access to api.snapcraft.io. I always get HTTP 408 errors when I do ‘snap refresh’. No end in sight after months of errors. Something pervasive is going on at the Canonical end which affects many more people than just me. What is the cause? When will it finally be fixed?

Hello, any update about this? I’m getting the same error whenever I try to install something with snap

error: cannot install "joplin-james-carroll": cannot query the store for updates: got unexpected
       HTTP status code 408 via POST to "https://api.snapcraft.io/v2/snaps/refresh"

It’s still the case that 408 errors are expected to be temporary, and usually go away after a few hours. However, with that specific package, you may prefer to try sudo snap install joplin-desktop instead, at least I’d prefer it, because I’m trying to get people to use the newer package name overtime :slight_smile: , but it might have the benefit of working around your problem quicker too!

Oh hi! hehe … I tried that but it’s not working as well … It’s not just about joplin… I tried installing slack and other apps and nothing is working since yesterday noon, and while researching online it seemed to be something that has been happening since March

error: cannot install "joplin-desktop": cannot query the store for updates: got unexpected HTTP
       status code 408 via POST to "https://api.snapcraft.io/v2/snaps/refresh"

I’m sorry for super late reply.

The problem is not in Ubuntu or any server. It had something to do with my internet router settings. I figured out some the things which i had done in that period of time that could have affected the server connection with my system. So one thing i did was change the ports. I called my ISP and he fixed the router and after that i did not encounter this issue even once.

Thanks for being so active. If not this way then i would have eventually solved it through your help.

1 Like

Hi there,

I just tried this for that exact same snap and it works fine:

curl -sX POST https://api.snapcraft.io/v2/snaps/refresh -H "Snap-Accept-Delta-Format: xdelta3" -H "Snap-Device-Series: 16" -H "Snap-Device-Architecture: amd64" -H "Content-type: application/json" -d '{"context": [], "actions": [{"action": "install", "instance-key": "xyzzy", "channel": "stable", "name": "joplin-james-carroll"}]}' | jq .

Ditto for joplin-desktop:

curl -sX POST https://api.snapcraft.io/v2/snaps/refresh -H "Snap-Accept-Delta-Format: xdelta3" -H "Snap-Device-Series: 16" -H "Snap-Device-Architecture: amd64" -H "Content-type: application/json" -d '{"context": [], "actions": [{"action": "install", "instance-key": "xyzzy", "channel": "stable", "name": "joplin-desktop"}]}' | jq .

@easmar Can you maybe try the above and make sure it returns some json and not a 408 status code?

  • Daniel

Hello @roadmr , yes it returned json

thanks @easmar - are you also still seeing problems when using snap install?

Because snapd uses the exact same API we are testing with the curl commands.

If snap install is consistently giving problems while the curl commands don’t, I would think it’s something with snapd’s network or proxy configuration.

Let me know.

  • Daniel

@roadmr yes it is still giving me the error! :frowning: Is there anyway to investigate the proxy configuration if that might be the issue? and thanks for your help!

Use this to check if you have a configured proxy:

sudo snap get system proxy.http
sudo snap get system proxy.https

If they are unset, you will get something like:

error: snap "core" has no "proxy.http" configuration option

To unset them:

sudo snap set system proxy.http!
sudo snap set system proxy.https!

this should likely be ... snap set ...

Indeed - corrected my post.

@roadmr Thank you for your feedback, both returned an error so no proxy set.

I came up with a temporary solution just to get the stuff I need, which is to connect my computer to my mobile 4g, and try from there, and it worked. So i’m not sure what the problem is, it can’t be my internet provider because I am using the same connection on my laptop and its working fine with snap (but there I am using an older version of ubuntu). So i’m not sure what the problem is, however this is an idea for those who are looking for this error like I was and couldn’t find any solution!

I found a strange thing that if I manually run snap download <app> it will succeed, however snap refresh or request for a dependence it will throw HTTP 408 exception.

I also have this exact error, and effectively can’t refresh snaps at all, it is 100% repeatable and it depends on what snaps are installed.

It refreshes without a problem if I have only one small snap installed, but immediately stops working for example if I install firefox.

I’m on Kubuntu 22.04.

Logs posted here: Unable to install any application from Snap Store

So sorry for the late reply and sorry for bumping but i think ive found the solution! CHanging the MTU from 1500 to 1400 fixed it for me instantly

sudo ip li set mtu 1400 dev <interface>