aclap-dev / vdhcoapp

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

Companion app cannot be found when using Flatpak builds of Firefox #137

Closed nunyafukkinbizness closed 1 year ago

nunyafukkinbizness commented 2 years ago

The video downloadhelper Companion app cannot be found when using Flatpak or Snap builds of Firefox Why was this issue closed when it hasn't been solved? This issue has existed for at least a year! Work on it! I have found another add on that works without any companion app for most sites and yet another one that works in youtube without a companion app! I love video downloadhelper and used it for many years but if it isn't fixed to work with Ubuntu 22.04 104.0.1 (64-bit) Snap and Flatpak versions it is useless for Ubuntu, and I'm sure other Linux users. Linux is growing don't lose your audience by ignoring them!

RylanSchaeffer commented 2 years ago

@nunyafukkinbizness do you have a solution? I have this same issue!

posita commented 2 years ago

Ref #91. Also, from https://bugzilla.mozilla.org/show_bug.cgi?id=1621763#c5 regarding possible solutions:

The portal discovery idea and the socket communication suggestions seem promising for providing a more secure way of supporting native messaging from the Firefox flatpak. Another method I was wondering about was using Flatpak Extensions. I am not that familiar with how they work exactly but I think they act as a kind of overlay onto the flatpak the way that the app flatpak overlays the runtime flatpak. My thought was that perhaps the native messaging host application could be packaged into an extension and optionally installed on top of the Firefox flatpak. I think this might work well for something like the KDE Plasma/Browser integration because the native messaging app is just a small program that needs a dbus permission to talk to for its functionality. Perhaps other native messaging hosts do not fit this model.

One other thing I thought was interesting was that the Zotero WebExtension worked fine with both Zotero and Firefox as flatpaks. The reason for this is that the Zotero application runs an http server and the Zotero WebExtension communicates with that server via http. Since both flatpaks have the network permission, the WebExtension was able to communicate with the application just as it normally does.

See also:

SifiW commented 2 years ago

You can uninstall Firefox and install from PPA following these instructions and the companion app will be found again. https://github.com/mi-g/vdhcoapp/issues/133#issuecomment-1165334764

knghtbrd commented 1 year ago

StreamDeck doesn't use PPAs, but does use Flatpack Firefox. The solution is likely to use the program Flatseal to configure Firefox's sandbox to open access fore VDH to "see" coapp. If I understood what exactly what isn't happening, I could probably work out what needs to be done to fix it.

justunsix commented 1 year ago

Here is a workaround to get the Video Downloadhelper Companion App visible in the Flatpak Firefox so the add on can use it to download files. Workaround is based on ideas listed in the sources section. It involves:

Workaround Steps

The workaround is granting extra permissions to the Flatpak Firefox so use with care.

Sources

Thank you to these posts for contributing to the steps above.

  1. https://github.com/mi-g/vdhcoapp/issues/91#issuecomment-1247940392 - insecure work around
  2. https://github.com/mi-g/vdhcoapp/issues/137#issuecomment-1274491105 - idea to give Firefox permissions to see the Companion application
  3. How to install Video DownloadHelper coapp in flatpak Chrome...

Problems

Problems I encountered and fixes.

The companion app keeps saying "Verifying..."

Downloads failing with read only filesystem error.

CHJ85 commented 1 year ago

This is still an issue. Will there be a flatpak available soon? I'd really like to use this addon. I looked at the workaround, but that sounds way over my head.

jntesteves commented 1 year ago

Installing for Firefox Flatpak is super easy, it just needs a small adaptation to the installation instructions:

tar xf net.downloadhelper.coapp-1.6.3-1_amd64.tar.gz -C ~/.var/app/org.mozilla.firefox
flatpak run --command=$HOME/.var/app/org.mozilla.firefox/net.downloadhelper.coapp-1.6.3/bin/net.downloadhelper.coapp-linux-64 org.mozilla.firefox install --user

I'd also recommend changing the default download folder in the extension's settings to ~/Downloads. No messing with permissions necessary.

CHJ85 commented 1 year ago

Thank you so much @jntesteves

cheako commented 1 year ago

Here is another solution: https://github.com/mi-g/vdhcoapp/issues/91#issuecomment-1247940392

jntesteves commented 1 year ago

Here is another solution: #91 (comment)

That is not a solution, it is an insecure hack and totally unnecessary. Don't do that!

The solution to this issue is to just update the installation instructions to install it correctly within the sandbox, like I mentioned in the comment above. I'd send a PR if the documentation repository was public, but it doesn't seem like it is. Is the maintainer still active? @mi-g

paulrouget commented 1 year ago

@jntesteves i'm looking into that. I will add the proper instructions, and maybe add that to an install script.

paulrouget commented 1 year ago

Is this still a problem with the latest version of Firefox? It's supposed to have been fixed.

paulrouget commented 1 year ago

Closing in favor of https://github.com/aclap-dev/vdhcoapp/issues/159

CHJ85 commented 1 year ago

I'm no longer using the Flatpak version anymore due to all kinds of problems. However. vdhcoapp is not recognized by latest Firefox build 117.0, on Manjaro Linux. This is not related to the Flatpak issue though.

paulrouget commented 1 year ago

I'm no longer using the Flatpak version anymore due to all kinds of problems. However. vdhcoapp is not recognized by latest Firefox build 117.0, on Manjaro Linux. This is not related to the Flatpak issue though.

Can you file a specific issue for that? I can assist in debugging.

CHJ85 commented 1 year ago

@paulrouget Sure, and thank you.