andy-portmen / native-client

Native Messaging component for Windows, Linux, and Mac OS that is written in NodeJS.
https://add0n.com/open-in.html
Mozilla Public License 2.0
722 stars 474 forks source link

AbortError on Firefox #123

Open jandede opened 1 year ago

jandede commented 1 year ago

Version: 111.0.1 Mozilla Firefox Snap for Ubuntu Ubuntu 23.04

I installed the script with ./install.sh

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

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

host is ready <<<

Seems ok right?

But in Native Integration page, I click Check Connection, a pop-up appears saying "Cannot find the native client. Follow the 3 steps to install the native client"

Console messages (2 per click):

AbortError: Native application start canceled by user NativeMessaging.jsm:185 _doInitPortal resource://gre/modules/NativeMessaging.jsm:185 InterpretGeneratorResume self-hosted:1822 AsyncFunctionThrow self-hosted:814

and

NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINativeMessagingPortal.closeSession]

Canceled by user? This is a fresh Ubuntu install. Worked perfectly yesterday with Arch. I've installed all programs that are required I tried the same with Chrome, Waterfox, what have you but I couldn't get it to work with anything, so I don't think it's a Firefox issue..

Anyone have any idea what this error means? Cheers

SigmFreud commented 1 year ago

Seems ok right?

No. As already started here 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

But this method stopped working already in ubuntu 22.04.02: error

Ok. I tried to specify the path manually. Open this file: ~/.config/com.add0n.node/run.sh And change "./node" to "/home/user/snap/firefox/common/com.add0n.node/node". As a result:

#!/usr/bin/env bash
/home/user/snap/firefox/common/com.add0n.node/node host.js

But now I get the same errorr that I do not know how to fix: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINativeMessagingPortal.closeSession] Screenshot from 2023-05-06 14-59-00

jandede commented 1 year ago

@SigmFreud thanks for clarification.

I've concluded that this is most likely an issue with Snap. I've been out of the scene for a long time so I hardly knew what it even is! However I found this (unrelated) FF addon has issues with specifically the Snap version of FF https://github.com/browserpass/browserpass-native/issues/112

I then installed non-snap version of Firefox [113.0 (64-bit)], and this add-on works once again. Wohoo!

Also, a lot of similiar add-ons started working again (like "Open with"), didn't work with that Snap version... So most likely it's snap that is at fault here

SigmFreud commented 1 year ago

jandede, you're probably right. The speed of upgrading any extensions for snap is very slow, so it's better to install the non-snap version FireFox until better times

jandede commented 1 year ago

Yep, Apparently it is being worked on, but this problem has been around for a long time: https://forum.snapcraft.io/t/native-messaging-support-in-strictly-confined-browser-snaps/26849

Mohammad-gif commented 1 year ago

(,_\°+minhaj enter#'|)(’i'···'p300pharm,-íì-,)m`-s|.·data'-^-’°–°–°\sumon20[Gulf]-.|.|dip&soikat_ò”swift