cli icon indicating copy to clipboard operation
cli copied to clipboard

Cannot login through the CLI

Open ssttkk opened this issue 6 years ago • 5 comments

Hello, I just installed bw on my windows box in order to test the CLI. I have a self hosted bitwarden on a Docker container that otherwise works fine, but when I try to bw login <[email protected]> <pass>, I get the following error message :

(node:11116) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'message' of null at Function.error (C:\snapshot\cli\build\bw.js:21947:33) at commands_login_command_LoginCommand. (C:\snapshot\cli\build\bw.js:23884:33) at Generator.throw () at rejected (C:\snapshot\cli\build\bw.js:23748:65) at process._tickCallback (internal/process/next_tick.js:68:7) (node:11116) 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(). (rejection id: 2) (node:11116) [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

bw seems to work fine still, I can get it to print the version or set up the URL of my local server.

Any ideas on what I could have done wrong ? I got the standalone executable for windows, and the version is 1.9.0

ssttkk avatar Mar 12 '20 13:03 ssttkk

I am having trouble reproducing the problem. I have tried:

bw login

and

bw login <email> <password>

both worked as expected.

kspearrin avatar Mar 12 '20 19:03 kspearrin

Thnak you for the quick answer. I tried to get bw through npm as well, but I get the same error. It appears even with the container not turned on, so I think I have a weird problem regarding bw itself. Is there any known issues on W10 ? I will try today to get another computer or a VM to test it with a different environnement.

ssttkk avatar Mar 13 '20 09:03 ssttkk

Hi, I have same issue only with powershell on windows 10. As @ssttkk I can't login but I don't have error message (or I don't wait enough), it's just like infinite loop. Weird thing is I can login with cmd terminal then on powerhshell terminal everything works as expect (even logout)

No problem detect on linux binary.

bitwarden server : self-hosted bw cli : 1.9.1 Windows 10 : 1909 Powershell : 5.1

oasisck avatar May 07 '20 12:05 oasisck

./bw login email

request to https://servername/api/accounts/prelogin failed, reason: self signed certificate

/bw -v 1.14.0

darton avatar Feb 25 '21 12:02 darton

Hi ssttkk, We're cleaning up our repositories in preparation for a major reorganization. Issues from last year will be marked as stale and closed after two weeks. If you still need help, comment to let us know and we'll look into it. Thanks!

bitwarden-bot avatar Apr 12 '22 19:04 bitwarden-bot