Error initializing client
Hi.
My colleague is having issues with 1Password CLI. He is using macOS on a MacBook Pro M1.
See the commands and errors below:
~ » echo "op://my-vault/my-secret-entry/username" | op inject --account mycompany.1password.com [ERROR] 2024/03/22 15:29:40 error initializing client: read: context deadline exceeded ~ » echo "op://my-vault/my-secret-entry/username" | op inject --account mycompany.1password.com [ERROR] 2024/03/22 15:29:59 error initializing client: connecting to desktop app: connecting to desktop app timed out, make sure it is installed, running and CLI integration is enabled
Could you please help us fix this issue?
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: macOS
Browser: Not Provided
Comments
-
We got another user with the same issue.
Here's the version of the software he (AB) is using:
- CLI version: 2.26.1
- Desktop version: 8.10.28
- MacOS version: 14.4 (23E214)
- MacBook Pro M3 Max
0 -
This is the version details for the first user.
Here's the version of the software he (RL) is using:
- CLI version: 2.26.0
- Desktop version: 8.10.28
- MacOS version: 13.5.2
- MacBook Pro M1
0 -
Have had the same issue here, with different versions though and some disparity to your findings, notably in that 8.10.28 on Production channel works for me but 8.10.30 on Beta channel doesn't.
- CLI version: 2.26.1, also tested with 2.25.1 and 2.22.1
- Desktop version: 8.10.30 on Beta release channel
- MacOS version: Sonoma 14.4.1 on a 2023 M3 MacBook Pro
I went down a bit of a rabbit hole thanks to an error message shown when testing CLI 2.25.1 of...
op account list [ERROR] 2024/03/30 10:27:32 connecting to desktop app: 1Password CLI couldn't connect to the 1Password desktop app. To fix this, update the desktop app to the latest version. If you're still having trouble connecting, restart the app. If you're using version 8.10.12 or earlier of the app, the 1Password CLI binary must be located in /usr/local/bin/op.
...and while I knew I was on a later version of the app, I also know
brew install 1password-cli
does not use/usr/local/bin/op
as its path for the binary - it uses a symlink of/opt/homebrew/bin/op
to point at a versioned package path (/opt/homebrew/Caskroom/1password-cli/2.26.1/op
)So I grabbed my rabbit hole gear (small flashlight and a flask of tea) and off I went...
Tests with 8.10.30 Beta release:
- Install CLI with packaged installer = works
- Install CLI with packaged installer and copy op binary to any other location = crashes
- Download CLI zip and extract binary to /usr/local/bin/op = works
- Download CLI zip and extract binary to any other location = crashes
- Install CLI with brew to default brew path = crashes
- Install CLI with brew and copy binary to /usr/local/bin/op = works
Tests with 8.10.28 Production release:
after setting release channel to Production and reinstalling to downgrade app from Beta using https://downloads.1password.com/mac/1Password.zip- All above tests work regardless of path
Tests with 8.10.30 Beta release:
after updating again from above working 8.10.28 Production- Same behavior as initial 8.10.30 Beta release tests, fails outside of
/usr/local/bin/op
Dropping some of the results against the 8.10.30 Beta release of the app below...
$ brew info 1password-cli ==> 1password-cli: 2.26.1 https://developer.1password.com/docs/cli /opt/homebrew/Caskroom/1password-cli/2.26.1 (2 files, 23.2MB) From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/1/1password-cli.rb ==> Name 1Password CLI ==> Description Command-line interface for 1Password ==> Artifacts op (Binary) ==> Analytics install: 6,470 (30 days), 18,175 (90 days), 50,448 (365 days) $ brew install 1password-cli ==> Downloading https://cache.agilebits.com/dist/1P/op2/pkg/v2.26.1/op_darwin_arm64_v2.26.1.zip Already downloaded: /Users/asuka/Library/Caches/Homebrew/downloads/10c189eb8b726bc0b012189cb021b52d95202876696cdaf524fec1ada35ce725--op_darwin_arm64_v2.26.1.zip ==> Installing Cask 1password-cli ==> Linking Binary 'op' to '/opt/homebrew/bin/op' 1password-cli was successfully installed! $ which op /opt/homebrew/bin/op $ op account list [ERROR] 2024/03/30 10:45:02 connecting to desktop app: connecting to desktop app timed out, make sure it is installed, running and CLI integration is enabled $ sha256sum /usr/local/bin/op /opt/homebrew/bin/op 436ff9e30ee94a4a02edab6fcfa5486ede5056c71c6b67e22cb010278390731a /usr/local/bin/op 436ff9e30ee94a4a02edab6fcfa5486ede5056c71c6b67e22cb010278390731a /opt/homebrew/bin/op $ /usr/local/bin/op --version 2.26.1 $ /opt/homebrew/bin/op --version 2.26.1 $ /usr/local/bin/op account list URL EMAIL USER ID my.1password.com hidden@gmail.com MIGHTNOTPOSTTHISONLINE nervhq.1password.com asuka@nervhq.com MIGHTNOTPOSTTHISEITHER $ /opt/homebrew/bin/op account list [ERROR] 2024/03/30 10:48:00 connecting to desktop app: connecting to desktop app timed out, make sure it is installed, running and CLI integration is enabled
0 -
@stuhall, thanks for your help. Switching from Beta (8.10.30) to Production and then re-installing 1Password (8.10.28) resolved the issue.
Encountered the issue when using this configuration:
CLI version: 2.26.1
Desktop version: 8.10.30 (Beta Channel)
MacOS version: 14.4.1
MacBook Pro M10 -
@stuhall and @bbaublitz -- I am having the same problem, on production 8.10.28 -- never used Beta channel, only production -- how does one reinstall 1password, or is there another recommended solution? Thanks.
0