andy-portmen / open-in

Send URLs from one browser to another one
http://add0n.com/open-in.html
172 stars 113 forks source link

Prompts to install native client despite native client being installed and working #62

Closed e-t-l closed 3 years ago

e-t-l commented 3 years ago

I've been using Open-in-Firefox on my Brave browser for a while and it's working fine. I just tried to go the other direction, installing Open-in-Brave on my Firefox browser, and I keep getting redirected to install the native client. Does the client have to be reinstalled for each combination of Open-[browser]-in-[browser]?

andy-portmen commented 3 years ago

Open the browser console (Ctrl + Shift + J), and see if you get an error when performing the action. Most likely the extension cannot find your external browser.

andy-portmen commented 3 years ago

Does the client have to be reinstalled for each combination of Open-[browser]-in-[browser]?

No, just once.

e-t-l commented 3 years ago

Here's my console output when I click the Open-in-Brave toolbar button on Firefox:

This extension does not have permission to use native manifest C:\Users\Elija_000\AppData\Local\com.add0n.node\manifest-firefox.json NativeManifests.jsm:136
    _tryPath resource://gre/modules/NativeManifests.jsm:136
ExtensionError: No such native application com.add0n.node ExtensionUtils.jsm:58:5
    ExtensionError resource://gre/modules/ExtensionUtils.jsm:58
    startupPromise resource://gre/modules/NativeMessaging.jsm:83
Unchecked lastError value: Error: Attempt to postMessage on disconnected port common.js:51
    exec moz-extension://bedf32eb-050f-4443-b52f-971ad52e2d66/common.js:51
This extension does not have permission to use native manifest C:\Users\Elija_000\AppData\Local\com.add0n.node\manifest-firefox.json NativeManifests.jsm:136
    _tryPath resource://gre/modules/NativeManifests.jsm:136
ExtensionError: No such native application com.add0n.node ExtensionUtils.jsm:58:5
    ExtensionError resource://gre/modules/ExtensionUtils.jsm:58
    startupPromise resource://gre/modules/NativeMessaging.jsm:83
Unchecked lastError value: Error: Attempt to postMessage on disconnected port index.js:102
    <anonymous> moz-extension://bedf32eb-050f-4443-b52f-971ad52e2d66/data/helper/index.js:102
andy-portmen commented 3 years ago

Have you installed the extension from "addons.mozilla.org"? Check the extension id from "about:support. It must be {c88f6be2-3757-446b-be27-27eedddbcae0}.

Based on the log, this id is not present in C:\Users\Elija_000\AppData\Local\com.add0n.node\manifest-firefox.json!

https://github.com/andy-portmen/native-client/blob/master/config.js#L85

e-t-l commented 3 years ago

Yes, installed from the official Mozilla addon site. Thank you for pointing me to that json file, though; I think that's the solution!

Like I mentioned in my original post, I've been using Open-in-Firefox "for a while." In other words, when I first installed the native client, brian-girko had not yet created the Open-in-Brave extension for Firefox, so that ID was not in my json file!

I added it manually, and now the extension works without issue.

While having an updater/installer script to update the native installer when new extensions are added is probably more trouble than it's worth, it may be a good idea to put this information in the add0n.com FAQ or something. Thanks for your help!