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
bitwarden-desktop: work with firefox.nativeMessagingHosts #347350
0.kind: enhancementAdd something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
bitwarden-desktop has a native messaging hosst so the firefox extension can communicate with desktop app for biometric authentication.
#339384 fixes the dynamically installed native messaging host file; however, I was wondering if we should actually not be installing that file in the user's home at all, and instead rely on the nativeMessagingHosts argument to the firefox wrapper.
Quick note also that bitwarden-desktop supports installing native messaging host files for multiple browsers, some of which afaict don't have the equivalent nativeMessagingHosts support in nixpkgs. So it may be worth keeping support for both methods.
Quick note also that bitwarden-desktop supports installing native messaging host files for multiple browsers, some of which afaict don't have the equivalent nativeMessagingHosts support in nixpkgs. So it may be worth keeping support for both methods.
The problem with this though is that it doesn't support all browsers either. For example, I use librewolf, which doesn't make a ~/.mozilla folder. This means I have to trick bitwarden into thinking I have firefox and make the folder manually.
The problem with this though is that it doesn't support all browsers either. For example, I use librewolf, which doesn't make a ~/.mozilla folder. This means I have to trick bitwarden into thinking I have firefox and make the folder manually.
Isn't the librewolf thing intended/known? I think either way you'd still have to ln -s at the minimum
On NixOS, the workaround isn't needed, since we can override the nativeMessagingHosts parameter in the derivation; at least, that is the proper way to install the native messaging host if you want it located at the equivalent of /usr/lib
PS with my testing, I don't need the symlink. It seems that librewolf has changed it so that they look at .mozilla too.
Would it be possible to include the lib/mozilla/native-messaging-host/com.8bit.bitwarden.json file in the bitwarden-desktop package, so users could optionally use programs.firefox.nativeMessagingHosts.packages to install it into Firefox?
Context: Currently I do not have a com.8bit.bitwarden.json file anywhere, not in the Nix store and not in my home directory, cf. #344073 (comment).
Would it be possible to include the lib/mozilla/native-messaging-host/com.8bit.bitwarden.json file in the bitwarden-desktop package, so users could optionally use programs.firefox.nativeMessagingHosts.packages to install it into Firefox?
Context: Currently I do not have a com.8bit.bitwarden.json file anywhere, not in the Nix store and not in my home directory, cf. #344073 (comment).
Looking into the bitwarden-desktop logs, it seems that we also need desktop_proxy to be present in the bin outputs, currently having this error while staring bitwarden:
17:51:27.392 › Error while generating manifests Error: Unable to find binary: /nix/store/hs40jamdw7kxvsmx9xrzb1bymgj29vcq-bitwarden-desktop-2024.12.0/bin/desktop_proxy
From what it could observe this binary is what gets referenced in com.8bit.bitwarden.json
Given this example that is generated using the app image version:
Like @devurandom I to do not have any com.8bit.bitwarden.json file.
Currently if i try to enable browser integration form bitwarden i get the following error:
With the following logs:
23:33:51.871 › Error generating manifests: Error: Unable to find binary: /nix/store/hs40jamdw7kxvsmx9xrzb1bymgj29vcq-bitwarden-desktop-2024.12.0/bin/desktop_proxy
23:33:51.872 › Error in browser integration: Error: Unable to find binary: /nix/store/hs40jamdw7kxvsmx9xrzb1bymgj29vcq-bitwarden-desktop-2024.12.0/bin/desktop_proxy
And still no file is generated:
~ ❱ ls -la ~/.mozilla/native-messaging-hosts/
lrwxrwxrwx - main 19 dez 20:44 .keep -> /nix/store/rnkfx7lhqksij1d2j5lk7dc0w9i2qpa4-home-manager-files/.mozilla/native-messaging-hosts/.keep
On my machine i have both firefox and bitwarden being installed using home-manager on a non nixos distro, not sure if that changes something.
Also like i pointed out in the comment above, maybe we need to also include this desktop_proxy bin that he tries to reference in the json file.
Reacted by Dennis Schridde, Jairo Llopis, Victor and nyawox
i've opened #374068 that adds desktop_proxy to $out/bin
and exposes com.8bit.bitwarden.json to $out/lib/mozilla/native-messaging-hosts/com.8bit.bitwarden.json so the user can symlink to their home directory
This was closed, but actually the title of this issue is not satisfied yet. pkgs.bitwarden-desktop does not appear to include a com.8bit.bitwarden.json file that could be picked up by programs.firefox.nativeMessagingHosts:
#425477 only installed the desktop_proxy executable file that would be necessary for the lib/mozilla/native-messaging-hosts/ integration to work, but does not install the JSON file necessary to use it with programs.firefox.nativeMessagingHosts.
0.kind: enhancementAdd something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Activity
bvngee commentedon Oct 8, 2024
Quick note also that bitwarden-desktop supports installing native messaging host files for multiple browsers, some of which afaict don't have the equivalent nativeMessagingHosts support in nixpkgs. So it may be worth keeping support for both methods.
dotlambda commentedon Oct 10, 2024
duplicate of #344073
huantianad commentedon Oct 10, 2024
@dotlambda hi, should this question not be in a separate issue? Should we switch discussion to #344073 or #339384?
huantianad commentedon Oct 12, 2024
@dotlambda sorry to bump
huantianad commentedon Nov 20, 2024
@bvngee
The problem with this though is that it doesn't support all browsers either. For example, I use librewolf, which doesn't make a
~/.mozillafolder. This means I have to trick bitwarden into thinking I have firefox and make the folder manually.bvngee commentedon Nov 20, 2024
Isn't the librewolf thing intended/known? I think either way you'd still have to
ln -sat the minimumhuantianad commentedon Nov 20, 2024
On NixOS, the workaround isn't needed, since we can override the
nativeMessagingHostsparameter in the derivation; at least, that is the proper way to install the native messaging host if you want it located at the equivalent of/usr/libPS with my testing, I don't need the symlink. It seems that librewolf has changed it so that they look at
.mozillatoo.devurandom commentedon Dec 15, 2024
Would it be possible to include the
lib/mozilla/native-messaging-host/com.8bit.bitwarden.jsonfile in thebitwarden-desktoppackage, so users could optionally useprograms.firefox.nativeMessagingHosts.packagesto install it into Firefox?Context: Currently I do not have a
com.8bit.bitwarden.jsonfile anywhere, not in the Nix store and not in my home directory, cf. #344073 (comment).M4RC3L05 commentedon Dec 19, 2024
Looking into the bitwarden-desktop logs, it seems that we also need desktop_proxy to be present in the bin outputs, currently having this error while staring bitwarden:
From what it could observe this binary is what gets referenced in
com.8bit.bitwarden.jsonGiven this example that is generated using the app image version:
I believe the temp dir stuff is related with app image.
huantianad commentedon Dec 19, 2024
@devurandom Have you tried making an empty folder at ~/.mozilla, then enabling the browser integration option inside of the bitwarden desktop app?
https://github.com/bitwarden/clients/blob/69d42a73e38822d3bed53a08cdd09457b9b7a65d/apps/desktop/src/main/native-messaging.main.ts
this is where the native messaging file is generated. not sure what the best way to include this in the derivation is, I suppose we can simply generate it and include a copy in the derivation source?
M4RC3L05 commentedon Dec 19, 2024
Like @devurandom I to do not have any
com.8bit.bitwarden.jsonfile.Currently if i try to enable browser integration form bitwarden i get the following error:
With the following logs:
And still no file is generated:
On my machine i have both firefox and bitwarden being installed using home-manager on a non nixos distro, not sure if that changes something.
Also like i pointed out in the comment above, maybe we need to also include this
desktop_proxybin that he tries to reference in the json file.nyawox commentedon Jan 15, 2025
i've opened #374068 that adds
desktop_proxyto$out/binand exposes
com.8bit.bitwarden.jsonto$out/lib/mozilla/native-messaging-hosts/com.8bit.bitwarden.jsonso the user can symlink to their home directorydevurandom commentedon Apr 24, 2026
This was closed, but actually the title of this issue is not satisfied yet.
pkgs.bitwarden-desktopdoes not appear to include acom.8bit.bitwarden.jsonfile that could be picked up byprograms.firefox.nativeMessagingHosts:#425477 only installed the
desktop_proxyexecutable file that would be necessary for thelib/mozilla/native-messaging-hosts/integration to work, but does not install the JSON file necessary to use it withprograms.firefox.nativeMessagingHosts.Should this issue be reopened?
See-also: #371479 (comment)