Spotify does not play audio

To give more detail on the matter at hand:

  • $XDG_RUNTIME_DIR is set to /run/user/1000/snap.spotify inside the snap
  • libpulse tries pulse socket locations in the following order: $XDG_RUNTIME_DIR/pulse/native, /var/run/pulse/native
  • pulse socket is not available in either location

Surprisingly it works on my system, the logs show that instead of trying $XDG_RUNTIME_DIR/pulse/native libpulse goes to {55f76458585f45adb352cdec85634ded}unix:/run/user/1000/pulse/native, as if $XDG_RUNTIME_DIR was completely ignored.