Open X9VoiD opened 1 year ago
Thanks for reporting. It seems like the XDG FileChooser portal is pointing the file to the sandboxed directory (/run/user/1000/doc/...
in the troubleshooting logs) instead of using the original path. So, Bottles is unnecessarily running from the sandboxed directory despite having full access to the directory you allowed with Flatseal, which means that UnityPlayer.dll
is not discovered in the sandboxed directory.
I tested locally; I stopped and masked xdg-desktop-portal.service xdg-desktop-portal-gnome.service xdg-desktop-portal-gtk.service
services using systemctl
, which forces to not use the FileChooser portal, and I can confirm that ULTRAKILL was running afterwards, as it wasn't pointing the file to the sandboxed directory.
This is a very unfortunate case for Bottles where we don't really have any control over, as it is inherently a Flatpak/XDG FileChooser portal limitation. We need to wait until https://github.com/flatpak/xdg-desktop-portal/issues/463 is resolved, to fully resolve this issue. Sorry.
Is it okay to share your DE or WM? I can reproduce it on GNOME, but I'd like to open an issue in the correct issue tracker and see if we can work around it.
Could you try to reproduce this with other apps too, like Lutris? If it is a bug in the portal it'll happen in other apps too, if not then this is a very interesting issue.
I tried ASHPD, gave access to xdg-download
, and opened ULTRAKILL.exe, yet strangely ASHPD showed the correct filesystem path.
I also tried 50.1, 2022-12-17 and 2022.11.14 to test regressions, but the results were consistent.
I'm not sure why this only happens with Bottles...
I think we can keep the blocked tag, its somewhat relevant.
Joining in to say I have no issues running this game or any Unity games. I also tested this game and was able to finish the tutorial (up to the point of getting a gun and first fight). Here's the usual debug info from Bottles:
Official Package: true
Version: '50.2'
DE/WM: cinnamon
Display:
X.org: true
X.org (port): :99.0
Wayland: false
Graphics:
vendors:
amd:
vendor: amd
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 5.15.0-58-generic
Disk:
Total: 8356999168
Free: 8356851712
RAM:
MemTotal: 15.6GiB
MemAvailable: 13.0GiB
Bottles_envs: null
Running Bottles from terminal doesn't give any output when running the game.
Thank you for testing @MrQuerter, I guess that narrows it down to a portal impl issue. We'll have to wait on @X9VoiD to return their DE/WM, as their debug info doesn't show it. From there, it's submitting an issue to the appropriate portal. Hopefully.
I use swaywm.
For the meantime, allowing full access via filesystem=host
makes the issue go away but I don't think it's the solution we wanted.
Correct. Recently we fully allowed xdg-download
to avoid that issue... but it hasn't.
@MrQuerter and @X9VoiD, what version of xdg-desktop-portal are you using on your system?
(name - installed version - newest version) Could it be a Wayland issue? Wouldn't explain the issue I get on development version, but idk.
xdg-desktop-portal 1.16.0
xdg-desktop-portal-gtk 1.14.1
Could it be a Wayland issue? Wouldn't explain the issue I get on development version, but idk.
I doubt it is. X9VoiD and I are using xdg-desktop-portal 1.15.0 and 1.16.0 respectively, where we're both affected by this. You're using 1.14.4, but you are unaffected. This could be a regression introduced in a version later than 1.14.4.
Maybe it's a locale issue? It could be happening on non-English-only systems and be working fine on English-only ones. That seems pretty likely.
I use an English-only system.
I use Polish system with Bottles forced to English for bug reports (using Flatseal LANGUAGE:en
variable since you can't choose program language in Bottles yet)
I have the exact same issue, im using the same WM but im using cinnamon as my DE when i used garuda, it worked, i was using kde version it could be smt else tho, maybe garuda set smt up
im pretty sure garuda uses the same WM
Dunno if this works for all Unity games or not but I was able to get Isekai Mario (a Unity Game obtained through itch.io) working in Bottles by opening Flatseal and adding the game's UnityPlayer.dll's path under the 'files' category.
IE:
/home/USER/.config/itch/apps/isekai-mario/Isekai Mario/UnityPlayer.dll
Itch by default stores games in a directory that's located in .config, so my guess is permissions get funky. Giving the sandbox the exact file lets the game load without having to compromise security by letting the sandbox use filesystem=host.
I know its been a while, but it seems to still be happening. I'm running into this issue too.
Im on arch linux with KDE Plasma 6 on wayland.
Same problem currently, tested with Getting Over It on Fedora 40 Silverblue, Wayland, Flatpak
Getting mixed results with Mint 22
I tried running ULTRAKILL with 5 methods:
wine: failed to open "/home/username/Games/ultrakill/ULTRAKILL.exe": c0000135
/home/username/Games
permission. It works without problems002c:err:seh:install_bpf Native libs are being loaded in low addresses, sc_seccomp 0x6ffd9a7b78f0, syscall 0x6ffd9a986930, not installing seccomp.
002c:err:seh:install_bpf The known reasons are /proc/sys/vm/legacy_va_layout set to 1 or 'ulimit -s' being 'unlimited'.
0024:err:module:import_dll Library UnityPlayer.dll (which is needed by L"Z:\\run\\user\\1000\\doc\\1e463466\\ULTRAKILL.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\run\\user\\1000\\doc\\1e463466\\ULTRAKILL.exe" failed, status c0000135
xdg-pictures
or /home/username/Obrazy
0024:err:module:import_dll Library UnityPlayer.dll (which is needed by L"Z:\\run\\user\\1000\\doc\\1e463466\\ULTRAKILL.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\run\\user\\1000\\doc\\1e463466\\ULTRAKILL.exe" failed, status c0000135
home/username/Games is a folder created by Heroic Games Launcher (issue 3336 in their GitHub repo)
In case 1 and 3 I played the game a little longer than before to the section after obtaining the gun. I also still forced Bottles to use LANGUAGE=en because it still doesn't have language selection.
Installed xdg packages:
Bottles health check:
Official Package: true
Version: '51.11'
DE/WM: cinnamon
Display:
X.org: true
X.org (port): :0
Wayland: false
Graphics:
vendors:
amd:
vendor: amd
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 6.8.0-36-generic
Disk:
Total: 8352456704
Free: 8352292864
RAM:
MemTotal: 15.6GiB
MemAvailable: 12.8GiB
Bottles_envs: null
Same issue with Unity games on Fedora Silverblue. UnityPlayer.dll not found, Flatseal permissions don't help with it. EDIT: Strangely it works now, just had to allow access to "~/Games"
Describe the bug
When running unity-based games, it always fails with the following log:
Do note that this only happens when using bottles, running the program purely using wine works fine. I have already given bottles the permission to access the folder where I am storing the games/apps via Flatseal.
To Reproduce
Package
Flatpak from Flathub
Distribution
NixOS 22.11
Debugging Information
Troubleshooting Logs
Additional context
No response