Unable to contact snap store (Ubuntu 20.04 LTS)

I have the same thread on the same topic but it was related to Linux Mint 20. So I try Ubuntu 20.04 LTS on my laptop and fortunately snap is working well. So I installed Ubuntu 20.04 LTS on my desktop after a long hassle but again I receive the same error (unable to contact snap store). I think there is a problem with my desktop installation so I was wondering if you could provide any solution.

Thanks in advance for your time.

By the way, the only difference in installation between my laptop and desktop is that during the installation I choose Iran for timezone whereas US for my desktop.

I made a fresh installation of Ubuntu and I was able to snap. Snap version was 2.48.2.1 (the same for snapd). After upgrading the packages I was not able to snap anymore. The current version of snap is 2.48.3+20.04 so I guess that is due to upgrading snap.

I resolve the problem by downgrading snapd.

Can you reach api.snapcraft.io with i.e. curl from this machine?

Is curl a command? It says:
Command ‘curl’ not found, but can be installed with:

sudo apt install curl
Should I install curl?

Yes please install curl withsudo apt install curl, and then run

curl --verbose api.snapcraft.io

This is output:

  • Trying 91.189.92.19:80…
  • TCP_NODELAY set
  • Connected to api.snapcraft.io (91.189.92.19) port 80 (#0)

GET / HTTP/1.1
Host: api.snapcraft.io
User-Agent: curl/7.68.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Server: gunicorn/19.7.1
    < Date: Tue, 06 Apr 2021 17:35:45 GMT
    < Content-Type: text/html; charset=utf-8
    < Content-Length: 64
    < Snap-Store-Version: 34
    < X-View-Name: snapdevicegw.webapi.root
    < X-VCS-Revision: 61bdb1d
    < X-Request-Id: BC9F4006648D0A325D770050606C9BF12EC2C7
    < Connection: keep-alive
    <
    snapcraft.io store API service - Copyright 2018-2019 Canonical.
  • Connection #0 to host api.snapcraft.io left intact

By the way, I am using the old version of snapd. Do you want me to install the new version?

Yes if you can update snapd that would be ideal

The problem is resolved. The problem was related to snap version 2.48.3+20.04. The current version is 2.49.2. If you wish I can downgrade the snap to 2.48.3+20.04 and check what would be the output of curl.

If the problem goes away for you with 2.49.2, that’s great, but I’m a bit surprised that upgrading snapd helped. It’s possible you were experiencing some sort of store outage. But also downgrading snapd wouldn’t change the output of the curl command

https://status.snapcraft.io/ shows that there was an outage earlier today, i guess you have just won the lottery and tried to use the store the moments it was inoperational …

My network connection is pretty goodScreenshot from 2021-06-01 09-51-32

However I encounter problems for updating …

sudo apt install chromium-browser Reading package lists… Done Building dependency tree
Reading state information… Done The following NEW packages will be installed: chromium-browser 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/48,3 kB of archives. After this operation, 164 kB of additional disk space will be used. Preconfiguring packages … (Reading database … 195431 files and directories currently installed.) Preparing to unpack …/chromium-browser_1%3a85.0.4183.83-0ubuntu0.20.04.2_amd64.deb … => Installing the chromium snap ==> Checking connectivity with the snap store

Progress: [ 20%] [##########################################…]

It hangs there @ 20% No outage reported and curl is installed but

curl --verbose api.snapcraft.io

  • Trying 91.189.92.41:80…
  • TCP_NODELAY set

must be killed as it hangs :frowning:

snap --version snap 2.50 snapd 2.50 series 16 ubuntu 20.04 kernel 5.8.0-53-generic

Any idea what’s wrong beside PBKAC ?

Please note that my post is timestamped April 7th while we are June 1st … (at least I am :slight_smile: ). Even weirder … the date of my post now change to June 1st

Are you able to manually download any snaps via snap download chromium?