Open schretzi opened 3 years ago
I'm unable to reproduce this using CLI v1.16.0 All 70 entries are created on cloud and self-hosted version.
Im having the same issue using bw login --apikey
After it fails the data.json file is resetted only showing:
{ "installedVersion": "1.18.0" }
@sso-bitwarden @schretzi confirmed working with 1.16.0
sudo npm install -g @bitwarden/cli@1.16.0
Thx for your test and results, based on your results I did some more tests. First, until now I only tested the "binary" version, as I don't have nodejs on my servers. Now I did additionally also test the npm version.
1.16.0 - All good, multiple runs in both the npm and binary version are ok 1.17.0 - Fails as binary, I get an error during npm installation (which I have no experience how to fix) 1.17.1 - Fails as npm 1.18.0 - Fails both npm and binary
But I got more detailed errors :
1.17.0 - binary version: Error creating lowdb storage adapter, "Malformed JSON in file: /home/schretzi/.config/Bitwarden CLI/data.json Unexpected end of JSON input"; emptying data file. Writing backup of data file to /home/schretzi/.config/Bitwarden CLI/data.json.bak
1.18.0 - npm version: 19 - Wed Sep 22 19:27:35 CEST 2021 You are not logged in. (node:6906) UnhandledPromiseRejectionWarning: Error: write EPIPE at afterWriteDispatched (internal/stream_base_commons.js:78:25) at writeGeneric (internal/stream_base_commons.js:73:3) at Socket._writeGeneric (net.js:714:5) at Socket._write (net.js:726:8) at doWrite (_stream_writable.js:415:12) at writeOrBuffer (_stream_writable.js:399:5) at Socket.Writable.write (_stream_writable.js:299:11) at program_Program.writeLn (/usr/local/lib/node_modules/@bitwarden/cli/build/bw.js:26655:20) at program_Program.processResponse (/usr/local/lib/node_modules/@bitwarden/cli/build/bw.js:27905:22) at program_Program.processResponse (/usr/local/lib/node_modules/@bitwarden/cli/build/bw.js:28320:15) (node:6906) 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: 1) (node:6906) [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. 20 - Wed Sep 22 19:27:37 CEST 2021 You are not logged in.
We have exactly the same problem. It occurs when you were already logged in (unlock vault with password bw unlock $password --raw
), log in again (bw login $user $password
) or use an existing session (BW_SESSION
). As with the others, the data.json is then reset in the event of an error.
Hi schretzi, 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!
This is still an issue.
This is not stale, I'm still running into this issue on v1.22.1
.
I was running into this under linux with 1.18.0, upgrading to 2022.9.0 seemed to fix it, though I'm not sure what I think about the massive change in the versioning scheme, I have no clue how far behind I was, but that's a whole separate conversation :D
Describe the Bug
CLI operations fail if some are made one after the other. Suddenly an operation in a sequence fails with "Your are not logged in." and all subsequent operations will fail too, as the cache is file is corrupt and all login/session information is lost.
This happens against the Cloud Service as well against the on-premise installation.
Steps To Reproduce
A simple loop can reproduce this issue:
Expected Result
All 70 entries should be sucessfully written on the bitwarden server and session should be still active
Actual Result
After a random amount of entries I receive a "Your are not logged in" error and session is closed. 7 sucessfull entries was the result of this run, it changes with each try but out of ~15-20 tests I never got all 70 sucessfull.
Screenshots or Videos
Environment
bw --version
): 1.18.0 (and older one)Additional Context