Closed dxlr8r closed 3 months ago
Most likely the native client cannot find the manifest. Path is not correct. Enable logging to get more info; https://www.chromium.org/for-testers/enable-logging/
I did enable logging. This line from first post is from the log:
[6732:6775:0828/211331.510049:WARNING:native_process_launcher.cc(185)] Can't find manifest for native messaging host com.add0n.node
Have you copied the manifest directory from Chrome to Ungoogled Chromium?
~/.config/google-chrome/NativeMessagingHosts/
to ~/.config/ungoogled-chromium/NativeMessagingHosts/
and ~/.config/thorium/NativeMessagingHosts/
The installer installs to chromium, and yes, for the other two I did copy as well. I also have the same error with "regular" "debian" chromium (which uses ~/.config/chromium
).
Also:
$ cat ~/.config/chromium/NativeMessagingHosts/com.add0n.node.json
{
"name": "com.add0n.node",
"description": "Node Host for Native Messaging",
"path": "/home/simen/.config/com.add0n.node/run.sh",
"type": "stdio",
"allowed_origins": ...
}
$ cat /home/simen/.config/com.add0n.node/run.sh
#!/usr/bin/env bash
/usr/bin/node $(dirname "$0")/host.js
$ which node
/usr/bin/node
$ echo 'console.log("Hello World!");' | node -
Hello World!
So to me it seems like everything is in order. I am not browser developer though, but could the shift to manifest v3 be the culprit?
I just tried Ungoogled Chromium
on Debian and it works for me with the default ~/.config/chromium
. Are you trying to connect a developer extension or the official one?
All my three Chromiums are clean installs with your extention from the Chrome Store. For Ungoogled Chromium, I dragged and dropped the crx.
https://chromewebstore.google.com/detail/lmeddoobegbaiopohmpmmobpnpjifpii
I dragged and dropped the crx.
What is the extension id? Open the options page and paste the URL here.
I dragged and dropped the crx.
What is the extension id? Open the options page and paste the URL here.
chrome-extension://lmeddoobegbaiopohmpmmobpnpjifpii/data/helper-firefox/index.html
I did check that as well. And with the other two, I used Chrome Web Store as I said.
One thing though, I use Sway, and no not have XWayland. So I execute using --ozone-platform=wayland
. But, it does work with Firefox, and if I remember correct Brave.
I'm unsure what the issue is, but it's possible that the browser is searching for the manifest file in a different directory. I was hoping to find some clues in the logs.
$ strace -yftTe trace=open,read -o log chromium --ozone-platform=wayland
$ tail -f log | grep ENOENT
16221 09:23:52 access("/etc/chromium/native-messaging-hosts/com.add0n.node.json", F_OK) = -1 ENOENT (No such file or directory) <0.000029>
Seems like it is trying native-messaging-hosts
and not NativeMessagingHosts
After doing:
cp -R ~/.config/chromium/NativeMessagingHosts/ /etc/chromium/native-messaging-hosts
It works. Dunno why it does not look in my home dir.
After some more digging, I noticed NativeMessagingUserLevelHosts
being false in:
/etc/chromium/policies/managed/policies.json
Setting it to true, it now reads from my home directory.
Also, I did purge and delete chromium's config directories in /etc (chromium and chromium.d), then reinstalling Ungoogled Chromium, so this setting seems to be default for Ungoogled Chromium atleast, might be for others as well.
That also explains why it did not work with any Chromium flavour, as their installer will not overwrite the configuration in /etc set by another Chromium installation. Now, I do not remember which Chromium I did install first, but as I said above, Ungoogled Chromium, at least, set this.
I think you installer should at least check if the value is false, and tell the user.
@andy-portmen thanks for help, you can close this case at your convenience. You can follow it up anyway you want, create a feature from it, or just close it and refer to it if anyone else has the issue.
Tested with debian built in, Ungoogled Chronium and Thorium (different config dir, but I just moved the files over). It seem unable to contact the native client:
It works from Firefox (to Chromium), though. The extension also state:
Log: Specified native messaging host not found.