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
- Former Member
Joshua_ag Thanks for the response. Yes I am still experiencing the issue...
- To my knowledge all commands fail but specifically I am using op insert and op read.
- Yes, 1Password is set to appear in my menu bar (which is the default when installing).
- It fails if 1password is locked. It never fails if it is unlocked. If 1password isn't running the CLI doesn't work at all because you get an error that it can't connect to the desktop app so that isn't a legitimate scenario. This should be pretty easy to reproduce. On a mac make sure 1password is locked and in the terminal attempt any op command. It will prompt for a password, once password is confirmed It will never complete the task.
- MacOS Sonoma 14.1.1
- ZSH, It's the default shell on MacOS. The terminal apps I'm using are Kitty primarily but the bug happens in all of them (allacritty, built in terminal, iTerm2).
- 1Password 8.10.23 and op cli is 2.23.0 (just updated to 2.24.0 and bug still exists)
- No, I'm using a password to unlock.
- Joshua_ag
1Password Team
Hi @sagmor, wonnage, @iwehrman, @teacy123, JKnockaert, dewe, @tannerellen, jeb1138, @tamrid,
I wanted to let you all know that we have been able to reproduce the issue with the
op plugin
command failing if run while 1Password is locked our developers are aware and looking into the issue.For user's who have reported the issue running other
op
commands. Can you let me know if you still experience the issue and answer the following questions:
- What command(s) are failing?
- Do you have 1Password set to appear in your menu bar / notification area / task bar?
- Is 1Password running but locked, running and unlocked, or not running at all when you run the command(s)?
- What operating system are you running?
- What shell are you running?
- What version of 1Password the app andop
are you running?
- Do you have biometrics enabled to unlock 1Password?Josh
ref: dev/b5/op#3948
- ScottS1P
1Password Team
Hello everyone,
If you are encountering an issue with the 1Password CLI not authenticating correctly, or the command hangs after a
NmRequestDelegatedSession
debug line, there are a few things that may help to resolve this.- If the 1Password app is installed:
- Check if the Settings > Developer > Integrate with 1Password CLI option is enabled.
- Also check Settings > General > Show 1Password in the menu bar (Mac) or Keep 1Password in the notification area (Windows).
- Make sure both option are also enabled, then try the CLI command again.
- Fully quit the 1Password app from the menu bar or system tray, then reopen it, unlock 1Password, and try the CLI command again.
- Make sure you have 1Password CLI and 1Password app fully updated to the latest version.
- Reboot your device.
If the problem still occurs after trying the above steps, send an email to support@1password.com so we can help you investigate further. To help expedite your case, include a link to this thread, your community username if you've posted here already, a copy of the output from the CLI command with
--debug
specified (do not include any secret or confidential information. Please review and redact the log lines before sending), any troubleshooting steps you've tried, the installed version of the CLI tool and 1Password app, and a diagnostics report if the 1Password app is installed on your device.Thank you,
- If the 1Password app is installed:
- tamirdOccasional Contributor
I am seeing this as well. Since the op binary is signed, I was not able to attach a debugger. I was able to collect stack traces using the
sample
command: https://gist.github.com/tamird/37007fefb7a4a9ceac25b4a980c6f8d9. It looks like the binary doesn't have debug symbols so I can't symbolicate, but it is 1password-cli2.24.0
on arm64 installed via homebrew. The binary's SHA-1 hash isbe5be5649dedf18460a7608d2107ea346f7c323e
.Looks like a bunch of threads are stuck in
__psynch_cvwait
under acgo
call. I guess 1password-cli is written in Go? - jeb1138New Contributor
Same behavior here when using
op plugin run
.I end up running my script, and then ctrl+c to kill it after it gets stuck at the
op
point, and then run my script again.macOS 14.1.2, 1Password 8.10.20, OP CLI 2.23.0.
- deweNew Contributor
Yeah, I've gotten used to run
pkill -f "op plugin"
a few times during the day. Not fun. Considering moving out of this solution... - Former Member
Yep, this is affecting me as well. Even running op signin will properly bring up the sign in window but the process will never complete leaving the terminal hung. I have to ctr + c to exit the command.
MacOS 14.1.1
1Password 8.10.20
OP CLI 2.23.0This is a pretty frustrating bug because I either have to open the 1password app and unlock it before running my cli commands, or I need to run the cli command, unlock 1password through the modal window, then ctrl + c to exit, then run the same command again.
- deweNew Contributor
I see the same behaviour when using the aws plugin
That is, running
shell
op plugin run --debug -- aws sts get-caller-identity
hangs on NmRequestDelegatedSession
- JKnockaertNew Contributor
I have two debug logs with cache disabled, running 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) executed after aborting the first attempt, now it succeeds
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 attempts.
- 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.