aclap-dev / vdhcoapp

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

ungoogled-chrome doesn't see companion app #193

Closed ewoks closed 9 months ago

ewoks commented 10 months ago

Ungoogled-Chromium Browser Version 120.0.6099.129 on Fedora 39.

As with other browsers ungoogled-chromium keeps the configs in ~/.config and as expected installer doesn't know about this browser. However manual copy of the net.downloadhelper.coapp.json to the /home/<user>/.config/ungoogled-chromium/NativeMessagingHosts/ from respectve folder of google-chrome or chromium doesn't help extension to find coapp. Default recommended debugging steps yell no results.

Any hints or advices would be welcome

paulrouget commented 10 months ago

How do you install and run ungoogled chrome?

Is it a snap, a flatpak or do you use apparmor?

ewoks commented 10 months ago

thanks for the promt reply... It is installed via Software App on Fedora 39, I just checked and it's via not user specific flatpak (dl.flathub.org) Did flatpak permission-set webextensions net.downloadhelper.coapp snap.ungoogled-chromium yes

$ flatpak permission-show snap.ungoogled-chromium
Table         Object                   App                         Permissions   Data
webextensions net.downloadhelper.coapp snap.ungoogled-chromium     yes           0x00

and just updated to the newest version 120.0.6099.199, unfortunatelly issue remains

paulrouget commented 10 months ago

If I'm not mistaken, this configuration (snap + chrome + native messenging) is just no supported. With chromium-based or regular chrome. I don't think we can do anything about it.

ewoks commented 10 months ago

is that different that google chrome? or you think it's about snap format? cause I just tried with it with Version 120.0.6099.199 (Official Build) (64-bit) which is basically the same google flavoured version and it works... What I noticed is that ~/vdhcoapp-2.0.10/vdhcoapp install didn't take into account existing ungoogled-chromium

ewoks commented 10 months ago

Oh wait, it seems that I just found it... :) I manually copied configuration stored in net.downloadhelper.coapp.json of another browser to the ~/.var/app/com.github.Eloston.UngoogledChromium/config/chromium/NativeMessagingHosts/ and in the extension settings companion app shows as installed, so it works!!! 🥳🥳🥳

ewoks commented 10 months ago

hopefully someone else find it useful when configuring ungoogled-chromium or similar flavours

paulrouget commented 10 months ago

com.github.Eloston.UngoogledChromium should already be supported. I'm surprised it doesn't work out of the box.

paulrouget commented 10 months ago

I'll look into this.

norweeg commented 10 months ago

It's likely that, despite linking itself in the sandbox for ungoogled-chromium, it doesn't create the native messaging hosts file similar to how it fails to create this file flatpak-installed Microsoft Edge (see #207). It's also likely that it fails to do this for Brave and the dev versions of all the browsers as well...

paulrouget commented 10 months ago

Ok, so for some flavors of google browsers, we only do half the work. Edge and Ungoogled are missing some files. I'll spawn a new release with a fix in the coming days once @norweeg confirms this works.

Sadly I can't try that myself as Edge doesn't support my computer architecture.

paulrouget commented 9 months ago

This will be fixed in CoApp 2.0.14