This appears to be a proxy setting for snapd. You can try clearing the proxy setting for snapd or setting it to your proxy server. In my scenario, this bug popped up during an upgrade to ubuntu server v22.04 lts. Snapd was installed to the latest version, but it reported during the upgrade:
Connection to Snap Store failed
Your system does not have a connection to the Snap Store. For the
best upgrade experience make sure that your system can connect to
api.snapcraft.io.
Do you still want to continue with the upgrade?
I got around this by setting the proxy server for snap. Put your proxy url in between the quotes below of the following commands:
$ sudo snap set system proxy.http=""
$ sudo snap set system proxy.https=""
I tried doing a 'snap refresh snapd' after setting the proxy, but it still indicated snapd wasn't installed (when it was). I believe this is the actual bug.
Regardless of it saying it wasn't installed, after setting the proxy server for snapd (to my proxy settings), I was able to perform the upgrade and it connected to api.snapcraft.io without any problems. I would assume if you have no proxy and clear the proxy settings (just by entering in snap commands as they are with no proxy) it would work for you as well.
This appears to be a proxy setting for snapd. You can try clearing the proxy setting for snapd or setting it to your proxy server. In my scenario, this bug popped up during an upgrade to ubuntu server v22.04 lts. Snapd was installed to the latest version, but it reported during the upgrade:
Connection to Snap Store failed
Your system does not have a connection to the Snap Store. For the
best upgrade experience make sure that your system can connect to
api.snapcraft.io.
Do you still want to continue with the upgrade?
I got around this by setting the proxy server for snap. Put your proxy url in between the quotes below of the following commands:
$ sudo snap set system proxy.http=""
$ sudo snap set system proxy.https=""
I tried doing a 'snap refresh snapd' after setting the proxy, but it still indicated snapd wasn't installed (when it was). I believe this is the actual bug.
Regardless of it saying it wasn't installed, after setting the proxy server for snapd (to my proxy settings), I was able to perform the upgrade and it connected to api.snapcraft.io without any problems. I would assume if you have no proxy and clear the proxy settings (just by entering in snap commands as they are with no proxy) it would work for you as well.