native-client icon indicating copy to clipboard operation
native-client copied to clipboard

Can't seem to install

Open dennisTGC opened this issue 2 years ago • 14 comments

Firefox connection check fails after installation.

I'm running Ubuntu 22.04 (so still experimental for a month) and Firefox 98.

I'll try update this issue after 22.04 becomes LTS.

dennisTGC avatar Mar 13 '22 10:03 dennisTGC

Is there any error on the installer.sh's output?

andy-portmen avatar Mar 14 '22 05:03 andy-portmen

No, not that I can see:

NodeJS status = 1
Installer is using the embedded NodeJS

 -> Root directory is /home/user/.config
 -> Creating a directory at /home/user/.config/google-chrome/NativeMessagingHosts
 -> Chrome Browser is supported
 -> Creating a directory at /home/user/.config/chromium/NativeMessagingHosts
 -> Chromium Browser is supported
 -> Creating a directory at /home/user/.config/vivaldi/NativeMessagingHosts
 -> Vivaldi Browser is supported
 -> Creating a directory at /home/user/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts
 -> Brave Browser is supported
 -> Creating a directory at /home/user/.config/microsoftedge/NativeMessagingHosts
 -> Microsoft Edge Browser is supported
 -> Creating a directory at /home/user/.mozilla/native-messaging-hosts
 -> Firefox Browser is supported
 -> Creating a directory at /home/user/.waterfox/native-messaging-hosts
 -> Waterfox Browser is supported
 -> Creating a directory at /home/user/.tor-browser/app/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts
 -> Tor Browser is supported
 -> Creating a directory at /home/user/.thunderbird/native-messaging-hosts
 -> Thunderbird Email Client is supported
 -> Creating a directory at /home/user/.config/com.add0n.node
 => Native Host is installed in /home/user/.config/com.add0n.node


>>> host is ready <<<

dennisTGC avatar Mar 14 '22 10:03 dennisTGC

It looks fine! Let's see if we can find something in the browser's console log.

Use Ctrl + J to open the browser console. Now try to use the extension and see if it generates a new error in the log section of the console.

andy-portmen avatar Mar 14 '22 11:03 andy-portmen

Small correction... use Ctrl + Shift + J to open the browser console.

Gitoffthelawn avatar Mar 15 '22 07:03 Gitoffthelawn

sorry it took a while, github had issues too..

Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:1
ExtensionError: No such native application com.add0n.node ExtensionUtils.jsm:58:5
Unchecked lastError value: Error: Attempt to postMessage on disconnected port common.js:51
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 4 background.js:1
ExtensionError: No such native application com.add0n.node ExtensionUtils.jsm:58:5
Unchecked lastError value: Error: Attempt to postMessage on disconnected port index.js:93

dennisTGC avatar Mar 23 '22 15:03 dennisTGC

xubuntu 20.04 same image

sean1138 avatar Apr 01 '22 02:04 sean1138

Same here (Lubuntu, 22.04). Does not work for VLC and MPV anymore since yesterday. I switched to 22.04 beta yesterday. Wild guess: Firefox switched to snap, and I get the feeling that breaks something...

sverris avatar Apr 03 '22 09:04 sverris

as far as I know, a Snapped app is sandboxed to a single directory inside "~/snap/" directory. To have a valid native client, we need to copy the executable to this directory. Even though this fixes the communication issue, still not a useful approach. There is no way to access the external browser (it is located outside of the root directory).

I am attaching a working native client (x64 only) for testing purposes. Use Firefox with Ctrl + Shift + J to see the error logs.

linux.zip

andy-portmen avatar Apr 04 '22 10:04 andy-portmen

Thanks. The new client does not help with MPV, but for VLC it does create a working connection. Yet the path for the VLC binary ( /snap/bin/vlc ?) is not correct - and whatever I try, it does not work.

sverris avatar Apr 04 '22 13:04 sverris

The connection works, but it can't find the executable, not even when filling in the correct path. Happens with brave and chromium-browser.

Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 4 background.js:1
    send moz-extension://5627815e-f99e-4a0d-86a9-bb84f55f5d09/background.js:1

dennisTGC avatar Apr 12 '22 06:04 dennisTGC

...a Snapped app is sandboxed to a single directory inside "~/snap/" directory. To have a valid native client, we need to copy the executable to this directory. ...I am attaching a working native client linux.zip

A directory was needed: -> Creating a directory at /home/user/snap/firefox/common/com.add0n.node => Native Host is installed in /home/user/snap/firefox/common/com.add0n.node ... -> Creating a directory at /home/user/snap/firefox/common/.mozilla/native-messaging-hosts -> Firefox Browser (snap version) is supported And ffmpeg installed to: /home/user/snap/firefox/common/ffmpeg

Now it works! Thanks very much!

SigmFreud avatar May 07 '22 11:05 SigmFreud

Hi @andy-portmen,

thanks for your effort in providing this addon in the first place. I was about to type together my own little local extension but then ran into the problem of javascript opening an external application from firefox ...

Unfortunately I am one of those

Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

users who run into the problem that @sean1138 is describing.

I have also tried your provided hotfix but unfortunately that didn't help.

Note that I've installed nodejs prior to running the install.sh:

/usr/bin/node
NodeJS status = 0
Installer is using your system NodeJS.
...

but I still get the connection problem.

Any help in sight?

staerz avatar Jul 15 '22 01:07 staerz

@andy-portmen @staerz any updates on this? I am on ubuntu 22.04 LTS. I got VLC and firefox from snap and it is not working

jgsimard avatar Jan 10 '23 15:01 jgsimard

@andy-portmen @staerz any updates on this? I am on ubuntu 22.04 LTS. I got VLC and firefox from snap and it is not working

Nope.

staerz avatar Jan 10 '23 15:01 staerz