Opening external applications (classic confinement)

My snap is using classic confinement and the application needs to open a pdf with the default system reader.

However, I get this message from AppArmor:

Log: apparmor="DENIED" operation="open" profile="/usr/bin/evince" name="/snap/notepadqq/x3/usr/lib/locale/it_IT/LC_IDENTIFICATION" pid=104109 comm="evince" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /snap/notepadqq/x3/usr/lib/locale/it_IT/LC_IDENTIFICATION (read)
* adjust program to read necessary files from $SNAP, $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

Is there something that I need to change in snapcraft.yaml? Or is this not supported yet?

Thank you

It seems that the evince program has loaded the library provided in the snap and thus try to do things with in-snap behavior, this configuration is NOT supported. You have to modify your application to drop all the snap entries in LD_LIBRARY_PATH before trying to call any external programs that are not in the snap to prevent them loading the wrong libraries, refer Subtle differences between devmode and classic confinement snaps for more details.

Also refer @lucyllewy’s reply in Snap confinement.