Score:0

Can't install snaps: x509: certificate has expired or is not yet valid

in flag

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?

Ray Wu avatar
ng flag
Are you sure you attached the right log output? It does not mention certificates
in flag
@RayWu the pastebin has this at the end: x509: certificate has expired or is not yet valid
in flag
@RayWu I've added some more info. It is now fixed on my desktop computer but I still have problems with my laptop.
Ray Wu avatar
ng flag
What's the date on your device?
in flag
It is the correct date and time.
kensai avatar
us flag
this could be an issue with some firewall doing SSL inspection....
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.