-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tangram won't work properly due to bwrap issues #197085
Comments
I should probably just mark Tangram as broken... My understanding is that it uses Epiphany, and Epiphany has been broken (at least for me) for some time. I get the same |
Ah, I wasn't aware of that! And yes, |
|
It seems to be triggered by this change in webkitgtk (in 2.38.0): WebKit/WebKit@31ac354 which means, along with this nixos patch: bubblewrap gets called this way:
which does not work AFAIK because Not sure what would be the best fix, maybe the Or maybe we can patch this as well (which was added to fix similar problems: WebKit/WebKit@6a87eb2): Changing the condition to this would do the trick I think:
|
@iwanb thanks for the investigation. Unfortunately, 84fb39e does not really say why it was introduced so it is hard to tell if all use cases are handled. In addition to the fonts, I am aware of Pipewire Jack module in Maybe the simplest work around would be moving the bwrap --ro-bind /nix/store /nix/store --ro-bind-try /run/current-system/sw/share/X11/fonts /run/current-system/sw/share/X11/fonts --ro-bind /run/current-system /run/current-system -- $(readlink $(which ls)) -l /run/current-system/ I would say this is really an issue with WebKitGTK – the same issue will likely happen on other systems if they use a symlink e.g. for Edit: Looks like there is also an open issue for bubblewrap containers/bubblewrap#390 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/webkitgtk-evolution-and-bubblewrap/23242/1 |
I have opened #201219, testing would be appreciated. |
Since WebKit/WebKit@31ac354, bubblewrap gets called the following way on NixOS system, when it has `share/fonts` in `environment.pathsToLink`: $ bwrap --ro-bind /nix/store /nix/store --ro-bind /run/current-system /run/current-system --ro-bind-try /run/current-system/sw/share/fonts /run/current-system/sw/share/fonts -- $(realpath $(which true)) bwrap: Can't mkdir parents for /run/current-system/sw/share/fonts: No such file or directory It fails because `/run/current-system/sw` is a symlink so bubblewrap is not be able to add another mountpoint inside. Ideally, we would remove the `/run/current-system/sw` bind mount and mount only specific subdirectories we need, like the fonts. Unfortunately, it is not clear what else is needed. For example, in the past, Pipewire’s Jack module was loaded from `/run/current-system/sw/lib` NixOS@756e603 So, for now, let’s keep the and mount and move the binding of NixOS directories to the end. Adding bindings starting at leaves and moving to root should be fine. While at it, let’s also make the binding of `/run/current-system` conditional since it will not be available outside of NixOS. Fixes: NixOS#197085
Since WebKit/WebKit@31ac354, bubblewrap gets called the following way on NixOS system, when it has `share/fonts` in `environment.pathsToLink`: $ bwrap --ro-bind /nix/store /nix/store --ro-bind /run/current-system /run/current-system --ro-bind-try /run/current-system/sw/share/fonts /run/current-system/sw/share/fonts -- $(realpath $(which true)) bwrap: Can't mkdir parents for /run/current-system/sw/share/fonts: No such file or directory It fails because `/run/current-system/sw` is a symlink so bubblewrap is not be able to add another mountpoint inside. Ideally, we would remove the `/run/current-system/sw` bind mount and mount only specific subdirectories we need, like the fonts. Unfortunately, it is not clear what else is needed. For example, in the past, Pipewire’s Jack module was loaded from `/run/current-system/sw/lib` 756e603 So, for now, let’s keep the and mount and move the binding of NixOS directories to the end. Adding bindings starting at leaves and moving to root should be fine. While at it, let’s also make the binding of `/run/current-system` conditional since it will not be available outside of NixOS. Fixes: #197085 (cherry picked from commit f930ba6)
Describe the bug
After starting a nix shell with Tangram, I'm able to run it, but it won't work properly:
bwrap
will error and no pages will be loaded. Please note that the application does start, but when an URL is inserted, an error is written on the console and it will not proceed loading the page; the canvas remains empty instead of loading a page. The error is the following:Steps To Reproduce
Steps to reproduce the behavior:
nix shell nixpkgs#tangram
re.sonny.Tangram
github.com
Expected behavior
Pages are loaded, no bwrap error is printed.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Using flatpak, tangram works as expected.
Notify maintainers
@austinbutler
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.I'm using flakes and this is the
flake.lock
for my nixos configuration, hoping it helpsThe text was updated successfully, but these errors were encountered: