aclap-dev / vdhcoapp

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

coapp not found on Debian 11/sid #96

Closed knghtbrd closed 1 year ago

knghtbrd commented 3 years ago

Firefox VDH 7.6.0 shows "Verifying Companion App…" (but never does). It is installed:

ii  net.downloadhelper.coapp 1.6.3        amd64        Video DownloadHelper companion app

Happy to help debug what the problem is, if I can. This Firefox profile has moved from Debian sid to Mint 20.x last June and back to Debian a year later. Tried a new profile in case some extension was causing a problem. That didn't help. I think the Flatpak version of Firefox can't access coapp at all or I'd have tried it as well.

I don't know much about the native messaging protocol or how to debug it, I'm afraid, so I'm not sure how to make this a more intelligent initial ticket.

mi-g commented 3 years ago

I'm afraid the coapp won't work, at least "as is", with a flatpak-installed version of Firefox. In such a situation, the Firefox won't be able to simply see the coapp installed files.

staltz commented 3 years ago

For those who ran into this issue as I did, Firefox installed via flatpak won't work, neither via snap, but apt install firefox worked for me.

knghtbrd commented 3 years ago

I didn't expect it would work with Flatpak's firefox. But it doesn't work with the Debian package either.

knghtbrd commented 2 years ago

Determined the problem. Firefox on Debian uses AppArmor. A solution:

Add this to /etc/apparmor.d/local/usr.bin.firefox:

# needed for VideoDownloadHelper's coapp
/opt/net.downloadhelper.coapp/** rix,

Then as root:

systemctl reload apparmor

May need to restart your browser after that. I didn't. This is out of coapp's hands, mostly, but a note in a README or something might help.

Jeoshua commented 2 years ago

"apt install firefox" is no longer an option for Ubuntu. They stopped offering firefox in any way other than as a snap, or as a flatpak. This error has just moved from a minor inconvenience to a major roadblock for a significant portion of Linux users.

knghtbrd commented 2 years ago

The issue of not supporting flatpak/snap just became a bigger issue, but I think you probably should've created a new ticket for that. The Flatpak version was my attempted workaround for the problem in Debian (not Ubuntu since Ubuntu has its own packages and its own batshit crazy way of doing … increasingly everything. sigh)

The problem I filed this bug about exists in the Debian Firefox package, and was fixed by adding an AppArmor tweak. I'm not sure if that tweak belongs in Debian's firefox package or in coapp ultimately, but it's a simple solution in either case.

Solving it for Flatpak requires opening a hole in a different kind of sandbox, possibly by building a flatpak version of coapp that runs the service that way—although there'd still be some manual commands needed to enable permission for Firefox to access it. Good security is always deny all, except allow some.

Snap is similar, possibly easier, since its not so focused on GUI/desktop apps.

paulrouget commented 1 year ago

The latest version of Firefox fixes this issue. Please re-open if that's still an issue.