You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"bwrap: Can't make symlink at /var/run: File exists" when XDG_RUNTIME_DIR starts with /var/run/ #2200
Some apps fail to start with error bwrap: Can't make symlink at /var/run: File exists
So far, I've had this issue with org.nextcloud.Nextcloud , com.github.wwmm.pulseeffects, com.discordapp.Discord
Issue still exists with 1.0.3. On a whim, I tried running Nextcloud again via sudo flatpak run org.nextcloud.Nextcloud and that worked. As such, I then rolled back to 1.0.2-r1 from flatpak-overlay and tried it there. Nextcloud worked with that too. Looking at the ebuild, it looks like the fix you were talking about was backported to 1.0.2. I think this rules out #2160 as the cause?
I realized that my Gentoo overlay hadn't synced correctly for some reason and I didn't have the option of flatpak 1.2.0. I have since added it to accept keyword, ran flatpak uninstall tootle and then reinstalled it. I still run into the same issue:
I have the same exact issue on Gentoo Linux as well on flatpak 1.0.6 (what's in the gentoo overlay). I am running the moonlight game streaming application. However, if I xhost and run as root, it will work.
After seeing PR #2710, and that it was supposed to fix it by basically resolving the symlink, I figured out a workaround: When running things via flatpak, change $XDG_RUNTIME_DIR to use the real path.
E.g.,
~$ echo $XDG_RUNTIME_DIR
/var/run/user/1000
~$ file /var/run
/var/run: symbolic link to ../run
~$ org.gnome.Fractal
bwrap: Can't make symlink at /var/run: File exists
~$ env XDG_RUNTIME_DIR=/run/user/1000 org.gnome.Fractal
~$
After seeing PR #2710, and that it was supposed to fix it by basically resolving the symlink, I figured out a workaround: When running things via flatpak, change $XDG_RUNTIME_DIR to use the real path.
E.g.,
~$ echo $XDG_RUNTIME_DIR
/var/run/user/1000
~$ file /var/run
/var/run: symbolic link to ../run
~$ org.gnome.Fractal
bwrap: Can't make symlink at /var/run: File exists
~$ env XDG_RUNTIME_DIR=/run/user/1000 org.gnome.Fractal
~$
Thank you for the tip!
A suggestion for the developers: put a mention of the XDG_RUNTIME_DIR variable into the error message!
I am running into the same issue on the Xubuntu 18.04.2 LTS Live ISO:
me@host:~$ flatpak --version
Flatpak 1.6.2 # from PPA
me@host:~$ flatpak run --user --command=bash org.gnome.gedit
Note that the directories
'/var/lib/flatpak/exports/share'
'/home/me/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
bwrap: Can't make symlink at /var/run: File exists
Even if I do
me@host:~$ sudo rm -rf /var/run
me@host:~$ sudo ln -s /run /var/run
me@host:~$ echo $XDG_RUNTIME_DIR
/run/user/999
me@host:~$ file /var/run
/var/run: symbolic link to /run
me@host:~$ env XDG_RUNTIME_DIR=/run/user/999 flatpak run --user --command=bash org.gnome.gedit
Note that the directories
'/var/lib/flatpak/exports/share'
'/home/me/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
bwrap: Can't make symlink at /var/run: File exists
I also hit this with Steam, it sets persist=. permission which triggers this bug with a recent Flatpak 1.12.2. persist=. is the ugliest Flatpak hack to support dotfiles directly under ~/.
I don't blame the Steam maintainer, this should be removed from Flatpak altogether.
No one should set persist=., instead maintainers should set filesystem=home.
Information for anyone who is getting the symptom "Can't make symlink at /var/run: File exists":
This is an error message that can happen for multiple reasons. It's shown by a low-level component (bubblewrap) which does not have enough context to be able to tell you the reason why this is happening.
The original reason for that error message in this specific issue is that XDG_RUNTIME_DIR was set to a path starting with /var/run, on a system where /var/run was a symlink to /run.
Any other reason for the same error message is outside the scope of this issue. #3477 is another example of the same error message happening for a different reason. If you are seeing the same error message for a different reason, please check for other issue reports that match, and if there is none, open a separate issue with full details (including flatpak run -vv output so that we can see what is going on).
Please do not reply to this closed issue.
A suggestion for the developers: put a mention of the XDG_RUNTIME_DIR variable into the error message!
No, that would be misleading. bubblewrap does not have enough information to know that the root cause for the bug involves XDG_RUNTIME_DIR.
The root cause involving XDG_RUNTIME_DIR was already fixed, the root cause involving /var/run/media is #3477 and has not been fixed, and there are probably other reasons why the same error message can appear.
changed the title [-]bwrap: Can't make symlink at /var/run: File exists[/-][+]"bwrap: Can't make symlink at /var/run: File exists" when XDG_RUNTIME_DIR starts with /var/run/[/+]on Jan 12, 2023
Activity
alexlarsson commentedon Oct 8, 2018
I believe this might be fixed by #2160, which is in the 1.0.3 release. Can you test that?
KD0BPV commentedon Oct 10, 2018
1.0.3 isn't available on the
flatpak-overlayyet, but I'll try a manual build and see what happens.KD0BPV commentedon Oct 10, 2018
Issue still exists with 1.0.3. On a whim, I tried running Nextcloud again via
sudo flatpak run org.nextcloud.Nextcloudand that worked. As such, I then rolled back to 1.0.2-r1 fromflatpak-overlayand tried it there. Nextcloud worked with that too. Looking at the ebuild, it looks like the fix you were talking about was backported to 1.0.2. I think this rules out #2160 as the cause?YogSottot commentedon Oct 28, 2018
gentoo
omichalek commentedon Dec 1, 2018
Linux distribution and version
opensuse Tumbleweed
Linux 4.19.2-1-default #1 SMP PREEMPT Tue Nov 13 20:56:49 UTC 2018 (8adee6e) x86_64 x86_64 x86_64 GNU/Linux
Flatpak version
Flatpak 1.0.5
Description of the problem
The program does not start, just recently it was working however... it is completely unpredictable to me.
Steps to reproduce
more info:
edit, more info:
KD0BPV commentedon Dec 21, 2018
Now I'm getting this with com.discordapp.Discord too, which was working perfectly just yesterday.
sumdog commentedon Jan 28, 2019
I'm experiencing this problem currently on Gentoo:
I'm running flatpak-1.0.6
What's the current workaround for this issue?
sumdog commentedon Jan 28, 2019
I realized that my Gentoo overlay hadn't synced correctly for some reason and I didn't have the option of flatpak 1.2.0. I have since added it to accept keyword, ran
flatpak uninstall tootleand then reinstalled it. I still run into the same issue:flatpak: 1.2.0
ostree: 2019.1
duckinator commentedon Feb 1, 2019
Running into the same problem with com.slack.Slack from flathub on Fedora 29.
I do not have the problem with org.signal.Signal from flathub, on the same system.
ph1lt0r commentedon Feb 1, 2019
I have the same exact issue on Gentoo Linux as well on flatpak 1.0.6 (what's in the gentoo overlay). I am running the moonlight game streaming application. However, if I xhost and run as root, it will work.
duckinator commentedon Feb 26, 2019
After seeing PR #2710, and that it was supposed to fix it by basically resolving the symlink, I figured out a workaround: When running things via flatpak, change
$XDG_RUNTIME_DIRto use the real path.E.g.,
omichalek commentedon Feb 26, 2019
Thank you for the tip!
A suggestion for the developers: put a mention of the XDG_RUNTIME_DIR variable into the error message!
TingPing commentedon Feb 26, 2019
Anyway this can be closed, it will be fixed in the next release. Workaround above in the meantime.
probonopd commentedon Sep 15, 2019
I am runnnig into this as well:
probonopd commentedon Sep 15, 2019
Now for something more drastic:
probonopd commentedon Sep 15, 2019
Same result on Ubuntu 19.04 (Disco Dingo) Live ISO and Flatpak 1.2.4:
https://asciinema.org/a/XSmQ2WY4ha9T5ebKm5PBy3AwE
refi64 commentedon Sep 15, 2019
sudo rm -rf /var/runbasically just deleted almost every daemon communication socket, it's kinda a miracle your system didn't crash.probonopd commentedon Sep 15, 2019
I have just done this on a Live ISO (like I do all of my computing), so after the next reboot the system is in factory-new state.
tallero commentedon Jan 17, 2020
/var/runis a symlink of/run. On arch it is recreated at every boot. In any case that won't solve the problem.Source
tallero commentedon Mar 2, 2020
This still happens on Archlinux as of today.
probonopd commentedon Mar 22, 2020
I am running into the same issue on the Xubuntu 18.04.2 LTS Live ISO:
Even if I do
I keep getting the same result.
@TingPing
Please reopen, because it apparently still is an issue.
easbarba commentedon Jun 27, 2020
Just run in the issue.
flatpak run com.valvesoftware.Steam bwrap: Can't make symlink at $HOME/MusicDebian SID 10
Kernel: 5.7.0-1-amd64
Exwm
fallingcats commentedon Feb 3, 2021
I just had this happen on fully updated Arch, also with steam.
Flatpak 1.10.0tinywrkb commentedon Oct 26, 2021
I also hit this with Steam, it sets
persist=.permission which triggers this bug with a recent Flatpak 1.12.2.persist=.is the ugliest Flatpak hack to support dotfiles directly under~/.I don't blame the Steam maintainer, this should be removed from Flatpak altogether.
No one should set
persist=., instead maintainers should setfilesystem=home.schildbach commentedon Apr 20, 2022
This issue is still present in Flatpak 1.6.5.
aaronw2 commentedon Jan 12, 2023
It's still happening in 1.12.5 on OpenSUSE with FreeCAD and I'm seeing it in Steam as well.
smcv commentedon Jan 12, 2023
Information for anyone who is getting the symptom "Can't make symlink at /var/run: File exists":
This is an error message that can happen for multiple reasons. It's shown by a low-level component (bubblewrap) which does not have enough context to be able to tell you the reason why this is happening.
The original reason for that error message in this specific issue is that
XDG_RUNTIME_DIRwas set to a path starting with/var/run, on a system where/var/runwas a symlink to/run.Any other reason for the same error message is outside the scope of this issue. #3477 is another example of the same error message happening for a different reason. If you are seeing the same error message for a different reason, please check for other issue reports that match, and if there is none, open a separate issue with full details (including
flatpak run -vvoutput so that we can see what is going on).Please do not reply to this closed issue.
No, that would be misleading. bubblewrap does not have enough information to know that the root cause for the bug involves XDG_RUNTIME_DIR.
The root cause involving XDG_RUNTIME_DIR was already fixed, the root cause involving
/var/run/mediais #3477 and has not been fixed, and there are probably other reasons why the same error message can appear.[-]bwrap: Can't make symlink at /var/run: File exists[/-][+]"bwrap: Can't make symlink at /var/run: File exists" when XDG_RUNTIME_DIR starts with /var/run/[/+]