Debug and cache flags don't appear to do anything

hoverduck
hoverduck
Community Member

I'm running op v2.0.0 on Linux Mint 20.2, and adding --debug or --cache to any of my commands doesn't seem to have any effect. I've verified that other global flags like --format json do work, at least. Is this behaving as expected, or is there anything else I can do? Are the debug logs just going somewhere else I'm not aware of?

Really I'm just hoping that --cache will speed things up and I was hoping that the debug flag would point me in a useful direction, but neither seem to make a difference. With and without it, getting an item takes ~4.2s.

~ $ op item get ############## --debug
ID:          ##################
Title:       Fake Test Login
Vault:       Private (###################)
Created:     23 minutes ago
Updated:     23 minutes ago by hoverduck
Favorite:    false
Version:     1
Category:    LOGIN
Fields:
  username:    fake
  password:    iZQ9X6D3uYoPxfPqrvse

These are the entries I see in ~/.config/1Password/logs:

INFO  2022-03-25T16:23:07.083 tokio-runtime-worker(ThreadId(7)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO  2022-03-25T16:23:07.083 tokio-runtime-worker(ThreadId(7)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.
INFO  2022-03-25T16:23:08.084 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO  2022-03-25T16:23:08.084 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.
INFO  2022-03-25T16:23:09.086 tokio-runtime-worker(ThreadId(5)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO  2022-03-25T16:23:09.086 tokio-runtime-worker(ThreadId(5)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.
ERROR 2022-03-25T16:23:09.145 tokio-runtime-worker(ThreadId(2)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:60] message from b5x was None: EndConnection
ERROR 2022-03-25T16:23:09.145 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:63] failed to receive message from b5x: Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })
ERROR 2022-03-25T16:23:09.145 tokio-runtime-worker(ThreadId(3)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:63] failed to receive message from b5x: Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })
ERROR 2022-03-25T16:23:09.145 tokio-runtime-worker(ThreadId(2)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:31] Dropping connection with b5x due to error handling incoming message: EndConnection
ERROR 2022-03-25T16:23:09.146 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:31] Dropping connection with b5x due to error handling incoming message: EndConnection
ERROR 2022-03-25T16:23:09.146 tokio-runtime-worker(ThreadId(3)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:31] Dropping connection with b5x due to error handling incoming message: EndConnection
INFO  2022-03-25T16:23:10.087 tokio-runtime-worker(ThreadId(5)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO  2022-03-25T16:23:10.087 tokio-runtime-worker(ThreadId(5)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.
INFO  2022-03-25T16:23:11.088 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/lib.rs:305] Extension connecting.
INFO  2022-03-25T16:23:11.088 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/lib.rs:307] Extension connection accepted.
ERROR 2022-03-25T16:23:11.182 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:60] message from b5x was None: EndConnection
ERROR 2022-03-25T16:23:11.182 tokio-runtime-worker(ThreadId(2)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:63] failed to receive message from b5x: Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })
ERROR 2022-03-25T16:23:11.182 tokio-runtime-worker(ThreadId(4)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:31] Dropping connection with b5x due to error handling incoming message: EndConnection
ERROR 2022-03-25T16:23:11.182 tokio-runtime-worker(ThreadId(2)) [1P:native-messaging/op-native-core-integration/src/connection_handler.rs:31] Dropping connection with b5x due to error handling incoming message: EndConnection

1Password Version: CLI 2.0.0, Desktop 8.6.0 (80600076, on PRODUCTION)
Extension Version: Not Provided
OS Version: Linux Mint 20.2, kernel 5.11.0

Comments

  • mafrosis
    mafrosis
    Community Member

    +1 I don't see the OP_DEBUG flag doing anything.

  • Hey both!

    Thank you for reporting this, and I apologize for the late answer. The --debug flag is currently only used in a few places related to biometric authentication. The plan is to extend this functionality to contain debug logs all across the CLI, but, for the moment, it is not unexpected to not see it changing anything, during normal usage.

    I'd like to know more about your usage of this flag. Have you been using it in trying to diagnose a specific problem with the CLI? If so, what would you have expected for it to output?

    Related to the --cache flag, we're currently investigating multiple performance issues, and hope to bring some optimisations in future versions of the CLI. For the moment, in order to improve the performance of op item get, do consider including the --vault flag and querying items by IDs. More details on this in the op item get --help :)

    Let us know if you have any further questions or feedback! We're looking forward to hearing from you.

    Best,
    Horia

This discussion has been closed.