Can't install firefox after upgrade to 22.04 LTS

Can’t seem to find much information on this but I can still install Firefox with a PPA.

From the snap install command error: cannot install “firefox”: Post “https://api.snapcraft.io/v2/snaps/refresh”: dial tcp 127.0.0.1:443: connect: connection refused

ufw is inactive - the firewall

from the journal Sep 14 11:31:50 E6540 snapd[10162]: api_snaps.go:366: Installing snap “firefox” revision unset Sep 14 11:32:15 E6540 snapd[10162]: stateengine.go:149: state ensure error: Get “https://api.snapcraft.io/api/v1/snaps/sections”: dial tcp 127.0.0.1:443: connect: connection refused Sep 14 11:41:08 E6540 snapd[10162]: api_snaps.go:366: Installing snap “firefox” revision unset

Looks like a DNS issue to me, it seems the calls to api.snapcraft.io resolve to localhost (127.0.0.1)

snap-store works, takes about 30 seconds to download the catalog, and all i get are the editor’s choices. I have also re-installed snapd. I assume i’ll get firefox from the PPA, the 127.0.0.0 is for the install to connected to the local server (127)

It clearly doesn’t work. It’s trying to connect to the backend API and failing. Are you sure you’re not using something like Pihole or Adguard with rules to block the snap store backend? Because api.snapcraft.io points to localhost, which is a common ad-block technique. It should resolve:

alan@nuc:~$ host api.snapcraft.io
api.snapcraft.io has address 185.125.188.54
api.snapcraft.io has address 185.125.188.58
api.snapcraft.io has address 185.125.188.55
api.snapcraft.io has address 185.125.188.59

Those editor’s picks you’re seeing are debs, not snaps.

My Ubuntu 22.04 LTS, upgraded from 20.04 worked fine until the upgrade. I’m connected directly to my T-Mobile can so no pi-zero or adguard and uwf status is inactive. snapd has been re-installed.

synaptic says it installed firefox, snap won’t, but synaptic - firefox says installed, but not there.

looks like i’ll have to re install Linux, and I’d say for this problem, flatpak 1, snap 0.

Got It! Thanks for the ideas folks. Somehow “127.0.0.1 api.snapcraft.io” was added TWICE to my /etc/hosts file. No idea how that happened.

Thanks again.

1 Like