Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
2 years agoCLI hangs when requesting items
the cli had been working without issues for a while but about a day ago it began to indefinitely hang when fetching an item.
When I run: op item get XXX --otp --debug
I get:
9:35AM | DEBUG | Session delegation enabled
9:35AM | DEBUG | NM request: NmRequestAccounts
9:35AM | DEBUG | NM response: Success
9:35AM | DEBUG | NM request: NmRequestAccounts
9:35AM | DEBUG | NM response: Success
9:35AM | DEBUG | account not signed in, filter=XXXX latest_signin_user=XXXXXXXXXX
9:35AM | DEBUG | not signed in reason: session file not found
9:35AM | DEBUG | NM request: NmRequestAccounts
9:35AM | DEBUG | NM response: Success
9:35AM | DEBUG | NM request: NmRequestAuthorization
9:35AM | DEBUG | NM response: Success
9:35AM | DEBUG | NM request: NmRequestAccounts
9:35AM | DEBUG | NM response: Success
9:35AM | DEBUG | NM request: NmRequestDelegatedSession
and it just hangs there. Any idea of what could be wrong here?
1Password Version: 8.10.3 (81003012)
Extension Version: 2.15.0
OS Version: macOS 13.2.1 (22D68)
Browser:_ zsh
- wonnageOccasional Contributor
+1 to this. Latest version of OP CLI (2.21.0) on Ventura 13.5 with 1password 8.10.13. The problem seems to occur when 1Password isn't open. Running the CLI command brings up a popup to allow access; allowing access brings up the 1PW master password unlock screen. However, unlocking here doesn't seem to do anything - the screen goes away and I'm left with the same debug logs as @sagmor:
12:48PM | DEBUG | NM request: NmRequestAccounts
12:48PM | DEBUG | NM response: Success
12:48PM | DEBUG | NM request: NmRequestAuthorization
12:48PM | DEBUG | NM response: Success
12:48PM | DEBUG | NM request: NmRequestAccounts
12:48PM | DEBUG | NM response: Success
12:48PM | DEBUG | NM request: NmRequestDelegatedSession
<hangs forever here>
The workaround is to open the 1password app first, but that seems like an unnecessary step given that you can already pop up the auth window.
- JKnockaertNew Contributor
I have two debug logs with cache disabled using this command:
op plugin run --cache=false --debug -- aws s3 ls --profile my-profile
1) where it is hanging
1:38PM | WARN | unable to find default credentials: lstat/var/folders/... .terminal_session.aws: no such file or directory
1:38PM | WARN | unable to find default credentials: directory configuration not found
1:38PM | INFO | Using profile from /Users/.../.config/op/plugins/aws.json
1:38PM | DEBUG | Session delegation enabled
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | account not signed in, filter=... latest_signin_user=...
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAuthorization
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestDelegatedSession
2) where it works
1:38PM | WARN | unable to find default credentials: lstat /var/folders/... .terminal_session.aws: no such file or directory
1:38PM | WARN | unable to find default credentials: directory configuration not found
1:38PM | INFO | Using profile from /Users/.../.config/op/plugins/aws.json
1:38PM | DEBUG | Session delegation enabled
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | account not signed in, filter=... latest_signin_user=...
1:38PM | DEBUG | not signed in reason: session file not found
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAuthorization
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestDelegatedSession
1:38PM | DEBUG | NM response: Success
1:38PM | DEBUG | NM request: NmRequestAccounts
1:38PM | DEBUG | NM response: Success
The parts that are edited out are the same in both logs.
- Joshua_ag
1Password Team
Hi @sagmor, wonnage, @iwehrman, @teacy123, JKnockaert, dewe, @tannerellen, jeb1138, @tamrid, ecerulm, sebastianreload, MimerPlusPlus,
I have an update to share for the original reported issue of the CLI hanging when the 1Password app is locked. The latest nightly version of the 1Password app has a fix for this issue!
If anyone is willing to test it out that would be really helpful to confirm we have fully resolved the issue.
Please make sure you are running:
- 1Password 8.10.32 (81032006) or later - Learn how to Use 1Password nightly releases
-op --version
2.26.1 or later, learn how to Update to the latest version of 1Password CLIIf you are still experiencing the same issue with the CLI hanging when trying to authenticate with a locked copy of the 1Password app (or new issues) please let me know.
If you are not able to switch the nightly version of the 1Password app the fix should make it to the beta version and then eventually production version barring any potential regressions or issues (hopefully there are none).
- JKnockaertNew Contributor
Hi Joshua_ag, seems to work for me with the update!
- ecerulmNew Contributor
I just tried with the Nightly = 1Password for Mac 8.10.32 (81032013) and it does work for me (op --version 2.26.1).
op read
does no longer hangs after 1Password unlocks - Former Member
Hey @sagmor, thanks for reaching out and sorry for the delay here.
I am not seeing the same behavior at my end, but I'd like to help troubleshoot further.
It has been a while since you posted this, so would you mind downloading the latest version of op CLI and testing with it? If the issue persists with the latest version as well, could you share the output of the same command with the
--cache=false
flag? - Former Member
Same, this happens every time for me unless I unlock the app first. macOS Sonoma 14.0, OP CLI 2.21.0. This is not recent behavior w.r.t. the macOS or OP CLI version history.
6:15AM | DEBUG | Session delegation enabled
6:15AM | DEBUG | NM request: NmRequestAccounts
6:15AM | DEBUG | NM response: Success
6:15AM | DEBUG | NM request: NmRequestAccounts
6:15AM | DEBUG | NM response: Success
6:15AM | DEBUG | account not signed in, filter= latest_signin_user=[...]
6:15AM | DEBUG | NM request: NmRequestAccounts
6:15AM | DEBUG | NM response: Success
6:15AM | DEBUG | NM request: NmRequestAuthorization
6:15AM | DEBUG | NM response: Success
6:15AM | DEBUG | NM request: NmRequestAccounts
6:15AM | DEBUG | NM response: Success
6:15AM | DEBUG | NM request: NmRequestDelegatedSession
- Former Member
+1, exactly same behaviour. Unlocking through the UI prior to using the CLI command works. Running the CLI command a second time also works. Running it only once hangs.
- JKnockaertNew Contributor
Same issue here
- OP CLI 2.22.0
- MacOS 14.1
- 1Password for Mac 8.10.18 (81018040)