Snapd desktop-interfaces and missing fonts

I’ve removed the fonts that the telegram-snap was providing and adding the desktop interface instead. Then the snap auto-refreshed in my two laptops.
In a first one all went ok, in my main machine instead there was something not going correctly:

  • snap interfaces telegram-desktop was showing the desktop interface as connecting
  • snap run --shell telegram-desktop -c 'ls /usr/share/fonts' was not showing fonts, and thus the app was not rendering properly chinese fonts.

Removing the snap and reinstalling it + refresh to edge (where this change is) made it working. Unfortunately I fixed the issue apparently, so I can’t debug it anymore…

But I’m wondering if someone else using that interface got this kind of problem.

If the snap is using wrappers, then those wrappers aren’t going to be run with ‘snap run --shell’. Eg, if you have:

apps:
  foo:
    command: bin/desktop-launch ...

then neither ‘/snap/…/current/command-foo.wrapper’ nor ‘/snap/…/current/bin/desktop-launch’ will be run, so you probably aren’t getting env setup or the ‘first run’ of the desktop-launch which copies various things. I suspect you could debug this by removing SNAP_USER_DATA/* (ie, the .last_revision) for this revision and trying again (since that would trigger the first run).