I recently encountered an issue with my snap install on Ubuntu which took a few hours to track down and fix, and I am posting here in case anyone encounters the same problem.
Observations of issue:
- “snap find [app]” cannot find [app] or install [app], but can find “core” or an extremely limited set.
- “apt remove snapd --purge” and reinstall of snapd did not solve the issue.
- (Optional) “journalctl -u snapd --no-pager” shows an issue with communicating with “https://api.snapcraft.io/api/v1/snaps/sections” despite the URL being accessible from the system.
It turned out that I had set the environment variable following these MyriadRF instructions a while ago, unaware it would affect snapd’s ability to find regular official store apps.
What caused the issue:
“/etc/environment” contained “UBUNTU_STORE_ID=LimeNET” which b0rked snapd’s ability to reference the official snap store. There doesn’t seem to be (to my knowledge) a way to support more than one snap store with this ID (caveats with versioning matching apps noted!).
Solution:
Deleted the “UBUNTU_STORE_ID” reference, restarted snapd.
Hope this helps anyone encountering a similar issue.