Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave browser - Error: Specified native messaging host not found. #114

Closed
rere-dnaw opened this issue Nov 19, 2021 · 6 comments
Closed

Brave browser - Error: Specified native messaging host not found. #114

rere-dnaw opened this issue Nov 19, 2021 · 6 comments

Comments

@rere-dnaw
Copy link

General information

  • Operating system + version: Zorin OS 16 x86_64
  • Browser + version: Brave Version 1.32.106 Chromium: 96.0.4664.45 (Official Build) (64-bit)
  • Information about the host app:
    • How did you install it?
      downloaded a pre-built binary
    • If installed an official release, put a version
      ($ browserpass --version): browserpass: command not found
      ($ browserpass-linux64 --version): Browserpass host app version: 3.0.7
    • If built from sources, put a commit id ($ git describe --always):
  • Information about the browser extension:
    • How did you install it?
      webstore
    • Browserpass extension version as reported by your browser:
      3.7.2

If you are getting an error immediately after opening popup, have you followed the Configure browsers documentation section?

I did follow. I tried: make hosts-brave-user and sudo make hosts-brave

Exact steps to reproduce the problem

  1. make BIN=browserpass-linux64 configure

  2. sudo make BIN=browserpass-linux64 install

  3. I tried: make hosts-brave-user and sudo make hosts-brave

  4. Install extension.

What should happen?

The extension should be connected to host.

What happened instead?

Error: Error: Specified native messaging host not found.

PC:/usr/lib/browserpass$ ls -R
.:
browserpass-native  hosts  Makefile  policies

./hosts:
chromium  firefox

./hosts/chromium:
com.github.browserpass.native.json

./hosts/firefox:
com.github.browserpass.native.json

./policies:
chromium

./policies/chromium:
com.github.browserpass.native.json
@maximbaz
Copy link
Member

Hi there 👋

It's most probable that some (all) of these paths are incorrect, last time I used Brave 3 years ago, and maybe they have updated something since. There is no good way to know these directories, some browsers document them, in others we just find them by trial and error. Community effort is often driving this, and help is very welcome! If you know of any other extension that uses native host and that works for you, it will be quite helpful as you can just peek where they installed the hosts files :)

browserpass-native/Makefile

Lines 439 to 440 in d73f45c

Linux) mkdir -p "/etc/opt/chrome/policies/managed/"; \
ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "/etc/opt/chrome/policies/managed/$(APP_ID).json"; \

browserpass-native/Makefile

Lines 453 to 454 in d73f45c

Linux|*BSD) mkdir -p "$(XDG_CONFIG_HOME)/BraveSoftware/Brave-Browser/policies/managed/"; \
ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "$(XDG_CONFIG_HOME)/BraveSoftware/Brave-Browser/policies/managed/$(APP_ID).json"; \

This old comment of mine doesn't inspire confidence either 😅

#26 (comment)

@rere-dnaw
Copy link
Author

hi,
Thanks for the reply :) I think you are correct about the problem with paths. I did try some other pass extensions which are using native host but they didn't work with brave browser as well (or I was doing something wrong :P). Also I tried to use other paths instead but no luck there.

@tejing1
Copy link

tejing1 commented Jan 7, 2023

I have no idea if this is still an issue for anyone after over a year, but I'm using browserpass with brave without an issue on nixos+home-manager. These lines from my home-manager config should be fairly self-explanatory even if you don't know anything about nix:

{
  home.file.".config/BraveSoftware/Brave-Browser/NativeMessagingHosts/com.github.browserpass.native.json".source = "${pkgs.browserpass}/lib/browserpass/hosts/chromium/com.github.browserpass.native.json";
  home.file.".config/BraveSoftware/Brave-Browser/policies/managed/com.github.browserpass.native.json".source = "${pkgs.browserpass}/lib/browserpass/policies/chromium/com.github.browserpass.native.json";
}

Hope it's helpful regarding the locations brave is searching.

@maximbaz
Copy link
Member

maximbaz commented Mar 4, 2023

Thanks for confirming that these paths are working! These do seem to be exactly what we have in our Makefile today. Let's close this issue, and if at any point the paths need to be updated, just send out a PR, as those are completely community-driven!

@maximbaz maximbaz closed this as completed Mar 4, 2023
@ualich
Copy link

ualich commented Mar 5, 2023

This error also occurs when Brave Browser is installed with snap, as browser config files are not stored in ~/.config/BraveSoftware in this case.

@maximbaz
Copy link
Member

maximbaz commented Mar 5, 2023

Let's keep track of snap packages separately, feel free to create a new issue if you want, but probably following the #82 would be enough, as brave is based on chromium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants