Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with Waterfox on Linux even though app already installed #186

Open
audio101 opened this issue Nov 28, 2023 · 26 comments
Open

Comments

@audio101
Copy link

audio101 commented Nov 28, 2023

companion application required

Companion App not installed

vdhcoapp-bin 2 0 7-1

manual install

vdhcoapp-bin 2.0.7-1 [AUR]

waterfox-bin G6.0.6-1 [AUR]

[Linux, Manjaro XFCE]

@audio101 audio101 changed the title Doesn't work with Waterfox even though app already installed Doesn't work with Waterfox Linux even though app already installed Nov 28, 2023
@audio101 audio101 changed the title Doesn't work with Waterfox Linux even though app already installed Doesn't work with Waterfox on Linux even though app already installed Nov 28, 2023
@paulrouget
Copy link
Member

What's the profile directory for Waterfox ?

@audio101
Copy link
Author

/home/user/.waterfox/user.Default User/

@paulrouget
Copy link
Member

If you copy ~/.mozilla/native-messenging-host into ~/.waterfox, does it work?

@audio101
Copy link
Author

Screenshot from 2023-11-28 23-17-52

@audio101
Copy link
Author

audio101 commented Nov 28, 2023

When installed manually from home directory, it works (but must leave files there or else it doesn't work):

Companion App installed

When installed from AUR or from Opt directory, it doesn't work:

Companion App not installed

Also note I have a non-default profile folder set in my home directory for the browser.

Hope this helps.

@paulrouget
Copy link
Member

Do not use the Aur package, use the package we provide: https://github.com/aclap-dev/vdhcoapp/releases

Install the tar.bz2 (untar it anywhere you want) and the run <PATH>/vdhcoapp install.

Then ln -s ~/.mozilla/native-messenging-host your_profile_dir.

This is necessary for waterfox to know the existence of the coapp.

@audio101
Copy link
Author

Abrowser works automatically after manual install:

abrowser

Waterfox still not working:

waterfox link

waterfox

@paulrouget
Copy link
Member

Also note I have a non-default profile folder set in my home directory for the browser.

How do you set the profile directory?

@audio101
Copy link
Author

Using the "waterfox -p" command

@paulrouget
Copy link
Member

And is it recognized if you do not use a custom profile?

If not, is it recognized if you create a directory like this:

~/.waterfox/native-messenging-host

which recreate the .mozilla directory structure?

I'm trying to understand if it's a bug of Waterfox or a bug of our Coapp.

@audio101
Copy link
Author

I tested using a default Waterfox profile (i.e. /home/user/.waterfox/8v5oj8e6.Default User/) and it still does not detect the app which is already installed, same error as custom profile:

"Checking companion app returned: An unexpected error occurred".

/home/user/.waterfox/native-messaging-hosts/ already exists containing the file:

"net.downloadhelper.coapp.json"

@paulrouget
Copy link
Member

I'll look up waterfox internals.

Creating /home/user/.waterfox/native-messaging-hosts/net.downloadhelper.coapp.json with the same content as /home/user/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json should have worked.

Do you use a flatpak or snap version of Waterfox?

@audio101
Copy link
Author

Using AUR version: waterfox-bin G6.0.6-1

@paulrouget
Copy link
Member

There's a path to the binary within /home/user/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json

What's the path, and when you run that binary with --info, what does it say?

@audio101
Copy link
Author

audio101 commented Nov 29, 2023

There is only 1 file within the folder:

/home/user/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json

There is no other files or binary in that folder.

The only binaries are in the install folder:

"/opt/vdhcoapp-2.0.8/"

vdhcoapp, ffmpeg, ffprobe

Any chance you can run/test it on your end, and/or in a virtual environment Manjaro XFCE?

@paulrouget
Copy link
Member

Look inside /home/user/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json

grep path ~/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json

This will give you the path of the binary (for example "/opt/foo/vdhcoapp").

Then run that binary with the option --info: /opt/foo/vdhcoapp --info.

@audio101
Copy link
Author

[linux@user vdhcoapp-2.0.8]$ ./vdhcoapp --info
{
"id": "net.downloadhelper.coapp",
"name": "VdhCoApp",
"version": "2.0.8",
"binary": "/opt/vdhcoapp-2.0.8/vdhcoapp",
"displayName": "VdhCoApp",
"description": "Video DownloadHelper companion app",
"target": {
"os": "linux",
"arch": "x86_64",
"node": "18"
},
"home": "/home/user",
"converterBinary": "/opt/vdhcoapp-2.0.8/ffmpeg",
"converterBase": "ffmpeg",
"converterBaseVersion": "6.0"
}

@storm49152
Copy link

This is maybe not the correct place because it's not about Waterfox, but it's a similar issue, and the solution might help others.

I'm on Fedora 39 with Firefox (RPM, not snap or whatever), running with multiple profiles. When I updated to 2.0.10 and clicked the "Recheck" button, at first I had issues finding the Companion App. It returned: An unexpected error occurred.

What I figured out, is that when doing a system-install (/opt/vdhcoapp-2.0.10/vdhcoapp install), the installer places this JSON file: /usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json and Firefox does not appear to find this file.

After I symlinked net.downloadhelper.coapp.json into ~/.mozilla/native-messaging-hosts and clicked the "Recheck" button, the Companion App was found: /opt/vdhcoapp-2.0.10/vdhcoapp.

So, to round it up, this worked for me, with multiple Firefox profiles:
ln -s /usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json ~/.mozilla/native-messaging-hosts
(Run as user, not as root) Perhaps this helps to do something similar for Waterfox

@paulrouget
Copy link
Member

@storm49152 Hm, I'm surprised you had to do that.

Did you run the install command as root (you should not)?

@audio101
Copy link
Author

$ ln -s /usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json ~/.mozilla/native-messaging-hosts
ln: failed to create symbolic link '/home/linux/.mozilla/native-messaging-hosts/net.downloadhelper.coapp.json': File exists

@paulrouget
Copy link
Member

If you arrive here because of Google, please look at the troubleshooting section: https://github.com/aclap-dev/vdhcoapp/blob/master/README.md#troubleshooting

@audio101
Copy link
Author

Just had an idea (since I've had so many issues getting it to work mainly with Mozilla-based browsers, and so far it's still not working on the latest Waterfox vG6.0.7: "Checking companion app returned: An unexpected error occurred".

I was thinking (if it's possible and to code) in the settings under General > "Companion App", when it states "Companion App not installed", why not add a clickable button there that loads the system file manager which allows the user to manually "point" to the installed Companion app binary file path in their directory, and/or any other necessary files for it to work. That way it can then detect the Companion App files that have already been installed on the system, especially for the many varied Linux distros and other obscure/less common browsers, and also not having to create manual symlinks to get it to work.

So the end result would then hopefully be:

Found companion app: VdhCoApp 2.0.10
Companion app binary: /opt/vdhcoapp-2.0.10/vdhcoapp

What are your thoughts on this?

@paulrouget
Copy link
Member

Sadly this is not how browser extension work. The extension doesn't know and can't know where the coapp is located.

since I've had so many issues getting it to work mainly with Mozilla-based browsers

I have no idea what's going on with these special version of Firefox, but I believe the bug is on their side, not on the coapp side. They should be looking for the manifest in the mozilla directory, but they're not.

@audio101
Copy link
Author

Ok, thanks for the update & trying to resolve this issue...

If there's any other future updates or a fix for this, please post here. Cheers.

@storm49152
Copy link

@paulrouget That would be my mistake then: I checked the Bash history, and I installed as root.

@Kromilan
Copy link

Sorry to revive this. But considering I have essentially the same kind of problem, it felt more appropriate than to start a new issue.
I am on Fedora and use the flatpak version of librewolf.
I installed the coapp with curl -sSLf https://github.com/aclap-dev/vdhcoapp/releases/latest/download/install.sh | bash
after that I ran ~/.local/share/vdhcoapp/vdhcoapp install and flatpak permission-set webextensions net.downloadhelper.coapp io.gitlab.librewolf-community yes, but librewolf is still unable to find the coapp.
the output of .local/share/vdhcoapp/vdhcoapp --info is

{
  "id": "net.downloadhelper.coapp",
  "name": "VdhCoApp",
  "version": "2.0.19",
  "binary": "/home/kromilan/.local/share/vdhcoapp/vdhcoapp",
  "displayName": "VdhCoApp",
  "description": "Video DownloadHelper companion app",
  "target": {
    "os": "linux",
    "arch": "x86_64",
    "node": "18"
  },
  "home": "/home/kromilan",
  "converterBinary": "/home/kromilan/.local/share/vdhcoapp/ffmpeg",
  "converterBase": "ffmpeg",
  "converterBaseVersion": "c30f360"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants