Inconsistent behavior accessing through Bitwarden CLI

Hi there,

I am facing a strange issue when trying to list an item using “list items --search” in my server (version 2024.1.2) with Bitwarden CLI (version 2023.8.2). Items which match the search condition are listed sometimes yes and sometimes no (I did not found a pattern)

bw list items --search myItem --collectionid x --session y

No errors in these cases, just return “[ ]”. And there is no doubt that “myItem” is there because trying again is returned normally.

Any idea of what is going on here?

First try to update your cli, it’s rather old and probably a lot of bugs where fixed.

Also, client side there is nothing this project can do.
It might be a syncing issue, but once synced, it will work from that data. Which might contain something invalid, but it’s probably a client bug long fixed.

Hi BlackDex, thank you for your answer.

I’ve updated the CLI to the latest version (2024.2.0) and same result: sometimes the output is “[ ]”.

Not sure what can be the next step, I perform the list operation just after a login (I assume that this forces a sync) so add an additional sync doesn’t seem like it’s going to fix anything.

Regards.

Have you tried it?
I think there is some debug/verbose option, maybe try that and see if it helps tracking the issue.

Have you tried it?

Already tried and same result. Seems that the only way of getting the correct response again is logout and then login (I could implement this on my script when the issue happens but, how to determine if the response is empty because it just does not exist or because the issue?).

I think there is some debug/verbose option, maybe try that and see if it helps tracking the issue

Not really, nevertheless --response parameter returns some additional information about the operation performed, but in this case there is no difference between a correct response and a failed one other than the second one returns an empty set on “Data” property.

I guess that I have to open an issue on the Bitwarden CLI github page