Forum Discussion

davidmartos96's avatar
davidmartos96
Occasional Contributor
4 years ago

Option --fields not working on some items

Hello!
I was trying the new CLI version, but I encountered with a strange issue when using the op item get {someId} with the fields option.

To begin with, if I omit the fields option, I can see all the details, but strangely enough, the list of fields displays like this:
```
Fields:
password: somepassword
password: somepassword
rpassword: somepassword
source: some source
agree: ✓
: Create New Account

```

As you can see the password field is repeated multiple times, one of them with a leading "r", and the last item label is empty.
No matter which field I choose, e.g. "source", if I run op item get {someId} --fields label=source I get the following in the output: Create New Account

Thanks in advance!


1Password Version: 8.6.0
Extension Version: 2.0.0
OS Version: Linux x64 Fedora 35

12 Replies

  • davidmartos96's avatar
    davidmartos96
    Occasional Contributor

    @"Horia.Culea_1P" Thank you for the reply.
    The fields listed in the json format are the following:

    ```json
    "fields": [
    {
    "id": "",
    "type": "STRING",
    "label": "password",
    "value": "**"
    },
    {
    "id": "",
    "type": "STRING",
    "label": "username"
    },
    {
    "id": "",
    "type": "STRING",
    "label": "fname",
    "value": "
    "
    },
    {
    "id": "",
    "type": "STRING",
    "label": "lname",
    "value": "
    "
    },
    {
    "id": "",
    "type": "STRING",
    "label": "company",
    "value": "
    "
    },
    {
    "id": "username",
    "type": "STRING",
    "purpose": "USERNAME",
    "label": "email",
    "value": "
    *"
    },
    {
    "id": "password",
    "type": "CONCEALED",
    "purpose": "PASSWORD",
    "label": "password",
    "value": "
    *",
    "entropy": 379.5647,
    "password_details": {
    .... etc
    }
    },
    {
    "id": "",
    "type": "STRING",
    "label": "rpassword",
    "value": "
    *"
    },
    {
    "id": "",
    "type": "STRING",
    "label": "source",
    "value": "
    ****"
    },
    {
    "id": "",
    "type": "STRING",
    "label": "agree",
    "value": "✓"
    },
    {
    "id": "",
    "type": "STRING",
    "value": "Create New Account"
    },
    {
    "id": "notesPlain",
    "type": "STRING",
    "purpose": "NOTES",
    "label": "notesPlain"
    }
    ],

    ```

    If I open the item from the Linux client I can only see "username", "password", "página web" (spanish website) and "website", exactly the ones that have an ID in the json list.
    The op read op://vault-name/item-name/field-name works as expected.

    Taking a different item as an example I can see that there are fields that could even miss the label property:
    json
    {
    "id": "",
    "type": "STRING"
    },

    Hope this information is enough to help figuring out the problem.

  • Former Member's avatar
    Former Member

    Hey davidmartos96 ! Thanks for reaching out to us!

    Let's try to get to the bottom of this.
    For starters, can you let us know what fields you would expect to see in the human-readable output? From the overview you provided and the additional information, I reckon the fields of your item are password, source and agree, is this correct?
    Secondly, can you please let us know if the json format of your item (op item get ITEM --format json), as well as the values returned by op read command (op read op://vault-name/item-name/field-name) are correct, and correspond to your expectations? This will help us determine is there is a problem in the item parsing for the human friendly output.
    Thirdly, can you please check the item in 1Password for Linux, both in view and in edit mode, and confirm it looks as you'd expect it? This will help us determine if your item got malformed, in any way that could show in other clients as well.
    Lastly, have you experienced this problem with any other items?

    I am looking forward to hearing from you.

    Best,
    Horia