Skip to main content
ftpd
January 16, 2023
Question

op version two can't 'get' certain records

  • January 16, 2023
  • 12 replies
  • 271 views

Hi.
I'm trying to migrate from op CLI v1 to v2, but I've encountered this problem, that some records aren't recognized.

I'm sourcing a 'script' with lines like:

export TF_VAR_some_password="$(op2 item get --cache --fields password some-id)"

and it works for the half of my records - 19 are fine, 19 are not. The 'failed' records are always the same. It looks like that:
```
$ op2 item get good-id
ID: good-id
Title:
Vault: RedactedVault ()
Created: 1 year ago
Updated: 1 year ago by
Favorite: false
Tags: prod,rds
Version: 1
Category: LOGIN
Fields:
username:
password:

$ op2 item get bad-id
[ERROR] 2023/01/16 10:54:13 (404) Not Found: The requested resource was not found.
```

It works fine with 1Password CLI client version 1, both good-id and bad-id produce a valid json with my data.

Versions:

```
$ op2 --version
2.12.0

$ op --version
1.12.4
```

Any ideas, what I'm missing here?


1Password Version: 8.9.13
Extension Version: -
OS Version: Gentoo Linux, kernel 6.1.4
Browser:_ -

12 replies

ftpd
ftpdAuthor
March 1, 2023

For anyone searching for similar issue in the future: 1Password Support Team was able to find a root cause of this:

"There seems to be an issue where if the user who has most recently edited an item is deleted, when 1Password CLI attempts to create the human readable version of the item info (which is done when using op item get for all situations other than using JSON format, even if all of the human readable version is not displayed), it tries to resolve the User's UUID to get their name. Because the user that most recently edited this item no longer exists, this results in 1Password CLI being unable to resolve the user and the error is shown.

I've filed an issue internally to see if we can get this sorted out in the future."

And it matches my case - most (or even all?) of records I've checked and marked as 'not working' were created by a team member who left the company and his account was deleted from the organization. My current workaround is getting the data in JSON format and parsing them with jq to retrieve the string I need.

Thank you @Jack_P_1P, @1P_Simon and anyone else from your team involved in this ticket!

1Password Employee
March 1, 2023

Great find! That's a case we hadn't thought about when implementing. Thanks for tracking this down with Jack!

And another thanks for following up here. Especially your workaround will be useful in case anyone is reading along who is running into the same.

Cheers!