1password8 error when trying cli "op" derived from Homebrew on a M1 Mac

TomHsiung
TomHsiung
Community Member

Hi, there

I installed the 1password from Homebrew following this guide (https://developer.1password.com/docs/cli/get-started/). I use the latest 1password8 desktop app on my M1 Mac with Sonoma 14.0 and when I try to use op in terminal I encountered this error,

connecting to desktop app: For the 1Password app integration to work, update your desktop app to the latest version or move the CLI binary to /usr/local/bin/op.

What should I do to correct this error? Thanks


1Password Version: 8.10.16
Extension Version: Not Provided
OS Version: macOS 14.0
Browser: Not Provided

Comments

  • gewoonseba
    gewoonseba
    Community Member

    I have exactly the same issue. Did you manage to solve this issue? @TomHsiung

  • Hello!

    My first suggestion to try would be to reboot your machine and check for updates for 1Password 8, and check where op is installed. If it's not in /usr/local/bin/op, move it there and ensure /usr/local/bin is in your PATH. Another thing that sometimes gets missed is the "Integrate with 1Password" checkbox in 1Password 8 - if that's checked, has the app been restarted since? It's not technically a requirement, but sometimes does the trick.

    If you want to share what version of op you're using and where it's installed, what you get when you run the op command with --debug and any other details, I might be able to help further.

    Hope this helps!

  • roryschadler
    roryschadler
    Community Member

    I also get this error when using op. It only occurs on the first auth-required call (e.g. op vault ls). The first call returns that error. Subsequent calls work just fine for me, with the system's touch ID prompt appearing. After a timeout, it seems the CLI -> app integration drops again, and I get the same error once again.

    I'm on an M1 Mac, and Homebrew installs applications under /opt/homebrew on my machine. I can manually link the installation under /usr/local/bin, but this is not the default behavior for Homebrew on my machine and is not mentioned in the install instructions. Moreover, Homebrew inserts its binary directory before /usr/local/bin in the PATH, and reversing that change would break many other Homebrew-installed applications, so I would have to use the full path /usr/local/bin/op every time I want to invoke op.

    Homebrew PATH changes:

    % grep opt .zprofile
    
    eval "$(/opt/homebrew/bin/brew shellenv)"
    
    % /opt/homebrew/bin/brew shellenv | grep "export PATH"
    
    export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
    

    My 1Password app is at version 1Password for Mac 8.10.16 (81016047) and the CLI is 2.21.0.

  • roryschadler
    roryschadler
    Community Member

    I've found a work-around for this issue. Because the first call after a timeout would always fail, while the second call would work, I assumed the issue was related to the app not running in the background. I found and enabled the option to "Keep 1Password in the menu bar" under General settings, and have not seen this problem since.

  • gewoonseba
    gewoonseba
    Community Member

    My op version is 2.21.0 and my 1Password app is version 1Password for Mac 8.10.18.

    Both seem up to date and I just followed the instructions here on your own site which (since it uses homebrew) does not install op where you suggest @1P_Amanda . I would also rather not mess with moving it manually.

    For me also the first command I issue doesn't work, so your woraround @roryschadler doesn't work for me unfortunately

This discussion has been closed.