I’ve successfully built a Snap - except that the icons don’t appear on the menus or the Dash.
Here are the relevant contents of the squash file, it looks alright to me
squashfs-root/usr/share/applications/myapp.desktop
squashfs-root/usr/share/icons/hicolor/128x128/apps/myapp.png
squashfs-root/usr/share/icons/hicolor/64x64/apps/myapp.png
squashfs-root/usr/share/icons/hicolor/scalable/apps/myapp.svg
I get errors when I run it, but I don’t know whether they are important or relevant.
touch: cannot touch '/home/me/snap/myapp/common/.cache/desktop-runtime-date': No such file or directory
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/me/snap/myapp/common/.cache/gio-modules/libgiolibproxy.so
(python3:19770): Gdk-WARNING **: 13:14:29.439: Vulkan: ../src/amd/vulkan/radv_physical_device.c:1984: Device '/dev/dri/renderD128' is not using the AMDGPU kernel driver: Invalid argument (VK_ERROR_INCOMPATIBLE_DRIVER)
Fixed with help from ChatGPT 
Hello Chris, I am facing a similar problem related to the icons in the App Center ( App Center missing icons ). Can you please elaborate on how you managed to resolve this issue?
I’m a Fedora user and I haven’t published my app as a Snap yet, so know nothing about the Snap Store and not much about the latest Ubuntu. However…do your proper icons show on the menus you get when you put the cursor in the hot-corner or the Dash/Dock/Menu bar on the left of the screen?
It might be something missing from the myapp.desktop file, here is what mine looks like:
[Desktop Entry]
Name=Myapp
Exec=myapp
Comment=This app does something
Icon=myapp
Type=Application
Terminal=false
StartupNotify=true
Categories=This;That;
X-Desktop-File-Install-Version=0.27
StartupWMClass=com.github.Myapps.myapp
The last two lines fixed it for me. I’m not sure about the significance of the
com.github.Myapps.myapp
It’s the location of my source code on GitHub and it’s needed in my case as otherwise the Flatpak, RPM and Snap package versions get mixed up. It might be a requirement anyway and it might not need to be an actual GitHub location. (I told you I’m no expert
).
You might need just need
StartupWMClass=Myapp
or
StartupWMClass=myapp
Thank you for the prompt reply. In my case the icons work fine on the desktop and on the dock. There is not a lot of documentation on building Snaps or .desktop files so I appreciate your feedback. Personally, I like the AppImage format, but recently decided to try Snapcraft. I am assuming most people on Fedora are using Flatpack.
My suggestion probably won’t help then.