What are the snap URLs?

EDIT: This seems to be a classic XY problem. The fault lies not with my new provider, which supports IPv6 (my old one didn’t), but with the snap repositories, which fail to support IPv6. More details in the assorted comments.

I have a new broadband provider, and, bizarrely, it seems to be blocking access to snap.

When I connect to a different service (e.g. my phone’s hotspot), snap commands run without problem (e.g. snap find vlc or sudo snap refresh). But, when I connect to my new provider’s broadband, snap sits and waits for ages before failing.

$ snap find vlc
error: unable to contact snap store

I have to call my new provider to make a complaint, but I need to know specifically which URLs are being blocked.

I get the following responses, if this is of any help; you’ll notice that api and dashboard fail.

$ ping -c 1 snapcraft.io
PING snapcraft.io(website-content-cache-2.canonical.com (2620:2d:4000:1::27)) 56 data bytes
64 bytes from website-content-cache-2.canonical.com (2620:2d:4000:1::27): icmp_seq=1 ttl=56 time=19.0 ms

--- snapcraft.io ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 19.014/19.014/19.014/0.000 ms
$ ping -c 1 api.snapcraft.io
PING api.snapcraft.io(2620:2d:4000:1010::6d (2620:2d:4000:1010::6d)) 56 data bytes

--- api.snapcraft.io ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
$ ping -c 1 dashboard.snapcraft.io
PING dashboard.snapcraft.io(2620:2d:4000:1012::fc (2620:2d:4000:1012::fc)) 56 data bytes

--- dashboard.snapcraft.io ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Thank you

Ubuntu Version: 22.04

Try disabling IPv6 for your Internet connection in NetworkManager settings?

2 Likes

Try disabling IPv6 for your Internet connection in NetworkManager settings?

That worked, after I restarted the computer! Thank you.

Why does this happen? Does the snap repository reject IPv6? Do I have to leave IPv6 disabled?

Known issue with the snap store.

2 Likes

That’s marked fixed?

So it does, I missed that.
It’s broken though, for sure.

curl -i -6 api.snapcraft.io
curl: (7) Failed to connect to api.snapcraft.io port 80 after 2299 ms: Couldn't connect to server
curl -i -6 bbc.co.uk
HTTP/1.1 301 Moved Permanently
Connection: close
Content-Length: 0
Server: Varnish
Retry-After: 0
Accept-Ranges: bytes
Date: Fri, 14 Feb 2025 15:32:51 GMT
Via: 1.1 varnish
X-Served-By: cache-fra-etou8220146-FRA
X-Cache: HIT
X-Cache-Hits: 0
X-Timer: S1739547171.174861,VS0,VE0
Location: https://bbc.co.uk/
nel: {'report_to':'default','max_age': 2592000,'include_subdomains':true,'failure_fraction':0.05}
report-to: {'group':'default','max_age':2592000,'endpoints':[ {'url':'https://default.bbc-reporting-api.app/report-endpoint','priority':1} ],'include_subdomains':true}
req-svc-chain: FASTLY
Cache-Control: public,max-age=604800,stale-while-revalidate=3600,stale-if-error=3600
alt-svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
1 Like

I see that, but maybe the issue with your curl is a port issue:

$ nc -zv api.snapcraft.io {80,443}
nc: connect to api.snapcraft.io (2620:2d:4000:1010::42) port 80 (tcp) failed: Connection refused
nc: connect to api.snapcraft.io (2620:2d:4000:1010::6d) port 80 (tcp) failed: Connection refused
nc: connect to api.snapcraft.io (2620:2d:4000:1010::2e6) port 80 (tcp) failed: Connection refused
nc: connect to api.snapcraft.io (2620:2d:4000:1010::117) port 80 (tcp) failed: Connection refused
Connection to api.snapcraft.io (185.125.188.59) 80 port [tcp/http] succeeded!
Connection to api.snapcraft.io (2620:2d:4000:1010::42) 443 port [tcp/https] succeeded!

Thanks for the reference, @popey

I’ve left a comment, but do you think that I should reopen or create a new bug report?

Maybe I am indeed just holding it wrong.

curl -6 https://api.snapcraft.io/
snapcraft.io store API service - Copyright 2018-2022 Canonical.

While I’m here, I’ve noticed that esm.ubuntu.com also doesn’t like IPv6.

When I enable IPv6, apt update is outrageously slow, and eventually times out, when it comes to esm.ubuntu.com. When I disable IPv6, it works properly.

Here’s an example:

Err:6 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease                                            
  Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 2620:2d:4000:1::2e 443]

Does this warrant two new bug reports, one for snap and one for ESM?

You know what’s super weird? If I curl -6 api.snapcraft.io on my mobile (using the mobile network), I get the right response. But on my desktop on my home wifi, it doesn’t work. Both have IPv6 WAN IPs. Weirder yet: if I use my mobile as a personal hotspot, it also doesn’t work on the desktop. Something really funky is going on.

I had a similar issue with the old Forums and using a VPN was a work around but in the end my IP still blocks that url to this day and I’ve never received a satisfactory explanation or fix for this.

To answer the question from the subject:

1 Like

Thank you, @ogra

Unfortunately, it seems that my provider isn’t at fault — it’s the snap repositories failing to support IPv6.

I’ll edit my initial post to clarify.

Right, I noticed that, I only posted the link for completeness since I guess people looking for these URLs will end up in this post when they read the topic title :wink:

2 Likes

Thank you, yes, you’re right. Good old XY problem, right? (I can’t find the XKCD comic relating to this.)

1 Like

Have you reported this issue to forum.snapcraft.io? They handle the snap infrastructure there as Snapcraft isn’t an Ubuntu project, even though it depends on Ubuntu and is run by Canonical.

1 Like

No, I haven’t. Good idea.

Looking in the forum, I found these.

… and quite a few more.

Sorry, moderator hat on.

The developers of snap are in this very discourse. How would you like it if they went into your workplace and started telling them they don’t care? Well, they do care, it’s just a more complicated issue.

We have a low tolerance for the bashing on such projects or people in this discourse, so don’t do it. Hating on snaps, or the people who develop any part of it, will not be tolerated here.

Understood. I’ll edit my post accordingly.

1 Like