nixpak / nixpak

Runtime sandboxing for Nix
European Union Public License 1.2
321 stars 19 forks source link

Chromium IPC doesn't work for separate instances #63

Closed crabdancing closed 6 months ago

crabdancing commented 7 months ago

This is a weird one. Although chromium IPC seems to work fine for splitting apart and rejoining tabs, new instances of chromium do not seem to be able to coordinate handling their databases. Instead, it separately tries to open the database, fails because it's locked, and then I get the following:

image

Various electron apps also behave in a similar way (although they just display their login screens after failing silently).

Firefox does not show this issue at all -- it works completely as desired.

I should note that shareIpc is set to true, and my experimental profile is pretty lax right now. Do you know anything about this, @max-privatevoid?

max-privatevoid commented 6 months ago

Chromium does IPC via /tmp, so you need to make sure that /tmp is shared across all the instances, e.g. by bind-mounting a shared directory: https://github.com/nixpak/pkgs/blob/master/pkgs/browsers/chromium/default.nix#L14-L20

crabdancing commented 6 months ago

Awesome, that did the trick! Thanks! :D