Issues Authenticating with Bitwarden

Hello! I have installed the Bitwarden packages via home-manager. My ocnfig looks like this:

in {
    home.packages = [ 
    ...
    pkgs.bitwarden
    pkgs.bitwarden-cli
];

I used the instructions from the NixOS wiki page.

I’m able to start the program but I am unable to authenticate. When I try I get “An unexpected error has occurred.”

I get the following errors immediately after startup from the command line but before attempting to authenticate:

(node:4762) DeprecationWarning: file property is deprecated and will be removed in v5.
(node:4762) electron: The default of contextIsolation is deprecated and will be changing 
from false to true in a future release of Electron.  See 
https://github.com/electron/electron/issues/23506 for more information
(node:4762) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 
'setContextMenu' of undefined                               
...
(node:4762) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 
This error originated either by throwing inside of an async function without a catch 
block, or by rejecting a promise which was not handled with .catch(). To terminate 
the node process on unhandled promise rejection, use the CLI flag 
`--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). 
(rejection id: 1)       
(node:4762) [DEP0018] DeprecationWarning: Unhandled promise rejections are 
deprecated. In the future, promise rejections that are not handled will terminate 
the Node.js process with a non-zero exit code.

I don’t see any errors in the terminal after trying to authenticate.

Here’s what I’ve tried to fix it:

  1. Reboot
  2. Run the bitwarden app from the cli with the --unhandled-rejections=strict flag.

Is there some other troubleshooting that I can try?

Also, I a able to login using the web interface and the Android app. It’s just the Liunx app that is giving me problems.

There are two possiblies I can think of off the top of my head.

  1. Its some sort of network issue. On the android app I try to sign in and I get a very long wait time and then a similar message. Turns out it only happens on my WiFi and it’s my ISP. For some reason i don’t get this issue with the desktop app or in the browser.

  2. Some unrecoverable state. I never experienced this with Bitwarden but I did with Signal on NixOS. I couldn’t log in and eventually I deleted some cache file or something. Then when I ran Signal it worked just fine. If you used to run Bitwarden and then updated it and then started to have problems it could be because it could not migrate whatever files it stores locally. I believe that would leave you with two options, run each version from the version that worked to the one you are trying to run, one at a time. This might migrate the local data to be usable. Or if you know you have everything synced, and there could not be anything locally that you can’t get to on the webapp. Just delete all of the local cache files and then run it.

1 Like

Thank you for this help @RosarioPulella . I tried what you said and I’m still getting the same error though. I think I will try running the latest version from an AppImage to see if I’m still getting that error.