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

Still getting "Specified native messaging host not found", triple-checked everything. #90

Closed
tomatic opened this issue Apr 11, 2020 · 8 comments

Comments

@tomatic
Copy link

tomatic commented Apr 11, 2020

General information

  • Operating system + version: Kubuntu 19.10
  • Browser + version: Chromium Version 84.0.4108.0 (Developer Build) (64-bit)
  • Information about the host app:
    • How did you install it? Pre-built binary, manual install
    • If installed an official release, put a version ($ browserpass --version): 3.0.6
  • Information about the browser extension:
    • How did you install it? Chrome Web Store
    • Browserpass extension version as reported by your browser: 3.4.1

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

Yes


I've gone through the installation and browser config instructions multiple times, yet I still get the error "Specified native messaging host not found" when clicking the extension icon in Chromium's toolbar.

I have the native messaging host app installed at /usr/bin/browserpass-linux64, running it with --version reports version 3.0.6. as mentioned above. The file /home/thomas/.config/chromium/NativeMessagingHosts/com.github.browserpass.native.json points to /usr/lib/browserpass/hosts/chromium/com.github.browserpass.native.json, which contains this code:

{
    "name": "com.github.browserpass.native",
    "description": "Browserpass native component for the Chromium extension",
    "path": "/usr/bin/browserpass-linux64",
    "type": "stdio",
    "allowed_origins": [
        "chrome-extension://naepdomgkenhinolocfifgehidddafch/",
        "chrome-extension://pjmbgaakjkbhpopmakjoedenlfdmcdgm/",
        "chrome-extension://klfoddkbhleoaabpmiigbmpbjfljimgb/"
    ]
}

This should work then, shouldn't it? I believe I followed the installation instructions to the letter, but maybe I'm overlooking something?

@maximbaz
Copy link
Member

hey! just a quick first idea, is your browser installed as a snap package? I'm wondering if you are hitting #82

@tomatic
Copy link
Author

tomatic commented Apr 11, 2020

Nope, I installed Chromium via https://github.com/scheib/chromium-latest-linux. My Chromium install also doesn't seem to have an issue with reading/writing from/to $HOME/.config/chromium, b/c if I delete the folder it gets recreated upon launching Chromium and a subfolder Crash Reports also gets created.

@maximbaz
Copy link
Member

everything seems to be correct... I'll try to think what else we could try, in the meantime could you try to use system-wide location for the json file, /etc/chromium/native-messaging-hosts/?

@tomatic
Copy link
Author

tomatic commented Apr 11, 2020

Well that did the trick! Any idea why it doesn't work with the file in the home folder? Seems it should work as per https://developer.chrome.com/apps/nativeMessaging.

@maximbaz
Copy link
Member

It is strange indeed, in my experience people usually have problems using system-wide location 🤔 At least we know that the problem is definitely not with the binary nor with the contents of the json file, since in both /etc/chromium and home dir you create symlinks that point to the same file.

I wonder if this could be specific to the script you are using to install and run chromium, for example this override of "--user-data-dir": https://github.com/scheib/chromium-latest-linux/blob/4f4e9b85ea02a109e071452de936389cc2fd7376/run.sh#L5

To be honest I dont know what else to try... 🙂

@tomatic
Copy link
Author

tomatic commented Apr 11, 2020

Bingo! I never really checked out the run.sh script, but it seems it does indeed set a non-standard user dir. I created the symlink for the json file in that folder and now it works.

Thank you!

@maximbaz
Copy link
Member

Great!

it would have been so nice if chromium had shown the folders it's using on some sort of chrome:// page, which would simplify such debugging by a lot...

@maximbaz
Copy link
Member

Closing as it's solved and is specific to a chromium wrapper in use 🙂

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

2 participants