I’m currently working with Snap applications on my Linux system, but I’m running into an issue where certain environment variables seem to not be set correctly. Specifically, I’m having trouble with SNAP_USER_DATA
and SNAP_COMMON
directories not being accessible by the application, which is causing my snap to fail when trying to store user data and configuration files.
I’ve tried checking the environment variables using the env
command inside the snap, but the directories don’t seem to exist, even though I know they should. I’ve also checked the Snapcraft documentation on environment variables, including the check.snapcraft.io/docs/environment-variables#heading–snap-common, and tried troubleshooting the paths, but I still can’t resolve the issue.
Has anyone experienced something similar and found a solution? I’m unsure if the issue is related to the snap’s confinement or if it’s an issue with how the directories are mapped in the snap environment. Any guidance on how to solve this would be appreciated!