I am running a script to acquire my vault data and do some merging on them.
Using the bitwarden-cli, when I run:
bw items list
I get this error:
Error: Lock file is already being held
at /usr/local/Cellar/bitwarden-cli/2023.12.0/libexec/lib/node_modules/@bitwarden/cli/node_modules/proper-lockfile/lib/lockfile.js:68:47
at callback (/usr/local/Cellar/bitwarden-cli/2023.12.0/libexec/lib/node_modules/@bitwarden/cli/node_modules/graceful-fs/polyfills.js:306:20)
at FSReqCallback.oncomplete (node:fs:202:5) {
code: 'ELOCKED',
file: '/Users/ian.gallina/Library/Application Support/Bitwarden CLI/data.json'
}
After some research, I closed everything on macOS that could be using the vault, like Chrome extension, safari extension etc.
And the weird part is, I will not paste the full response here because my data is all there, but it starts to list the items and halfway through it stops.
I am not familiar with the dynamics of the lockfile, but I wondered if the file couldn’t be opened at all.
This is what I get in the middle of the listing process.
null,"passwordRevisionDate":null},"collectionIds":[]}]
/usr/local/Cellar/bitwarden-cli/2023.12.0/libexec/lib/node_modules/@bitwarden/cli/node_modules/proper-lockfile/lib/lockfile.js:68
return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
^