Using snap on Debian (stable, Stretch) and Nvidia 340xx legacy driver, any snap that include UI (anbox, hiri, etc.) does not work!
But glxgears works instead out-of-the-box, for instance.
E.g.:
~$ LIBGL_DEBUG=verbose hiri
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /snap/hiri/19/usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /snap/hiri/19/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: Can’t open configuration file /.drirc: No such file or directory.
libGL: Can’t open configuration file /.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
function is no-op