Recently, I upgrade my 18.04 laptop to 20.04 and during the process it complained that it cannot connect to api.snapcraft.io. I thought this might be fixed after the upgrade but it wasn't. So, I started debugging snap and enabled debug mode in snap
and run:
sudo journalctl -f -u snapd
the result is this.
when I run:
sudo snap install notes
result:
2021/06/26 16:35:20.197787 tool_linux.go:204: DEBUG: restarting into "/snap/snapd/current/usr/bin/snap"
2021/06/26 16:35:40.645576 error.go:102: DEBUG: error: cannot install "notes": Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: no such host
error: cannot install "notes": Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io: no such host
Based on the journalctl
output I understand there is problem with a certificate but don't know how to fix it. Googling didn't help either.
EDIT 1:
I managed to fix it on my desktop computer by setting manually the DNS servers to use Google's DNS; however, on my laptop that doesn't work. Furthermore, when I edit the connection details and save them and then go to check them again they are back to the way it was before. Very strange. Any ideas?