aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.72k stars 280 forks source link

How to install in a non-debian system #34

Closed lpvm closed 6 years ago

lpvm commented 6 years ago

This plugin is always a pain to have it running correctly.

The 1.2.1 tarball doesn't have the install scripts. What I did, from the deb package, was to install it to /opt, make symlinks from /usr/local/bin to that /opt/net.downloadhelper.coapp/bin/net.downloadhelper.coapp-linux-64 file and copied the the json file to /usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json But this has a code inside it that I don't know how to generate. Restarted firefox, but it still says can't find the companion app.

What to do?

mi-g commented 6 years ago

The coapp install page describes extra steps to be executed once you have downloaded the .tar.gz package:

targz user-wide install

# tar xf net.downloadhelper.coapp-1.2.3-1_amd64.tar.gz -C ~
# ~/net.downloadhelper.coapp-1.2.3/bin/net.downloadhelper.coapp-linux-64 install --user

targz system-wide install

# sudo tar xf net.downloadhelper.coapp-1.2.3-1_amd64.tar.gz -C /usr/local
# sudo /usr/local/net.downloadhelper.coapp-1.2.3/bin/net.downloadhelper.coapp-linux-64 install --system

If you think this could be better explained, please let me know.

lpvm commented 6 years ago

Hi @mi-g ,

First, let me thank you for the plugin that has served to get me some videos in the past!

Doing as mentioned, even after restarting Firefox, doesn't seem to work:

Companion application required
This operation requires an external application to be completed.

In the past, see https://github.com/mi-g/vdhcoapp/issues/17 it was solved by modifying the path in the setup scripts that are not present anymore. Don't know what to do this time. Creating a symlink ln -s /usr/local/net.downloadhelper.coapp-1.2.3/bin/net.downloadhelper.coapp-linux-64 /usr/local/bin/ doesn't result.

mi-g commented 6 years ago

I have seen the following issue a couple of times, maybe you are in this case:

A user installs the coapp as a user: the coapp code goes to ~/net.downloadhelper.coapp and the manifest file has been added to ~/.mozilla/firefox/native-messaging-hosts. Then the user changes his mind, delete the ~/net.downloadhelper.coapp directory and reinstall the coapp as system, which creates /opt/net.downloadhelper.coapp/ or /usr/local/net.downloadhelper.coapp/ with manifest in /usr/lib/mozilla/native-messaging-hosts.

As a result, when Firefox tries to launch the coapp, it first looks at a user-level manifest at ~/.mozilla/firefox/native-messaging-hosts and tries to execute the pointed binary that no longer exists. You get the error you described.

The workaround consists of removing the file ~/.mozilla/firefox/native-messaging-hosts/net.downloadhelper.coapp.json that is no longer valid.

Can you check that ?

lpvm commented 6 years ago

You got it @mi-g , although the json file was in ~/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json. It's working fine now. Thank you very much for your support.