Unable to contact snap store (Linux Mint 20)

Here is the past: https://paste.ubuntu.com/p/6tbmtyjM3S/

Mar 25 20:36:39 bahman-VPCCW23FX snapd[19069]: retry.go:120: DEBUG: Retrying because of: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Mar 25 20:36:39 bahman-VPCCW23FX snapd[19069]: retry.go:112: DEBUG: ShouldRetryError: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) *http.httpError -> true
Mar 25 20:36:39 bahman-VPCCW23FX snapd[19069]: retry.go:49: DEBUG: Retrying https://api.snapcraft.io/v2/snaps/refresh, attempt 4, elapsed time=30.00440791s

Seems like the requests are being sent, but there’s no response. Maybe there’s a hijacking proxy on the network?

For the record, can you run:

sudo snap unset system proxy.https
sudo snap unset system proxy.http

And then:

snap debug connectivity

The first and second command return: run configure hook of “core” snap.

The third command return:
Connectivity status:

So I’m not sure what to make to it. To summarize:

  • snap debug connectivity reports unreachable
  • snapd operations hit a timeout waiting for response
  • there is no proxy configured in snapd settings
  • there is no proxy in environment settings
  • curl to api.snapcraft.io works

Can you run the following?

snap known --direct model \
    series=16 brand-id=generic model=generic-classic

This will access the store API without snapd being the middle man.

I get this error: error: Get https://api.snapcraft.io/api/v1/snaps/assertions/model/16/generic/generic-classic?max-format=0: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Is there something in /etc/hosts that may be causing api.snapcraft.io to be resolved to some random host? Does accessing https://api.snapcraft.io/api/v1/snaps/assertions/model/16/generic/generic-classic?max-format=0 with your browser work?

There is no hosts directory in etc. I can connect to the link using my browser.