Flatpak apps missing, XDG_DATA_DIRS not properly set

After booting today, my Flatpak apps were missing from the application launcher and could not be started from shortcuts. When running a Flatpak app from the terminal, I get the message in the screenshot. How can I fix the environment variables?
image.png
Was this page helpful?