gopassbridge
gopassbridge copied to clipboard
"Error when communicating with the native messaging host." unless browser started from terminal.
For anyone else running into this ..
Everything "just works" if you just open the application from the terminal i.e.
open '/Applications/Brave Browser.app'
.. rather than from the usual cmd+space
launcher.
Not sure why, but I was really struggling to resolve before I got that sorted.
Usually, this means that your shell sets up some additional environment that is not set up when running from a launcher. What platform are you running it on?
I'm having the same issue on Mac OS 12.3.1.
Same on NixOS (Linux).
I think it might be, because I set a custom PASSWORD_STORE_DIR
via environment variable and according to firefox debug, it doesn't seem to get that env var. But I'm not sure why.
Edit: I can confirm that, the PASSWORD_STORE_DIR
environment variable was somehow not propagated to firefox, so I wrapped the executable to include it.
I was hitting this on MacOS (13.2.1). I had installed gopass, gopass-jsonapi, and GnuPG via MacPorts. When launching Chrome from the launcher, gpg
wasn't ending up in my PATH
. I modified ~/.config/gopass/gopass_wrapper.sh
to include:
export PATH="$PATH:/opt/local/bin" # required on MacOS/MacPorts
And that fixed it for me.