Open Bug 1462888 Opened 4 years ago Updated 2 months ago
Flareget addon not working on firefox
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180503143129 Steps to reproduce: Installed flareget from https://flareget.com/ and after installed flareget addon Actual results: it doesn't handle downloads (nothing happens) Expected results: Should handle downloads, it works on deb version
I assume you installed the deb package from http://flareget.com/download.html ? That package installs the following files on the host: /usr/lib/mozilla/native-messaging-hosts/com.flareget.flareget.json /usr/bin/flareget-chrome-host The firefox snap is confined and won't look for native messaging hosts on the host system. Not sure whether it will look for them somewhere under $HOME/snap/firefox/.
Is there any possible workaround?
I will assign a component to this issue, maybe someone with more experience can help you with a workaround.
Component: Untriaged → Add-ons Manager
Product: Firefox → Toolkit
If the firefox snap looks for native messaging hosts somewhere in $HOME (to be confirmed, and if so, where?), then one could probably install com.flareget.flareget.json there, install the flareget-chrome-host executable somewhere the snap can see it (under $SNAP_USER_DATA or $SNAP_COMMON), and modify the path to it in the json manifest. This needs to be tested and confirmed.
I don't think there's much we can do from the browser side here if the extension mentioned in comment 0 puts the native application in a place on the filesystem that is inaccessible to a snap-packaged firefox. Mike, can you correct me if I'm wrong and there's something we can do when packaging as snap (or forward the request). Otherwise, I think you'll have to ask the developer of this extension / native app to follow the suggestion in comment 4. Moving this bug to Tech Evangelism for that.
Component: Add-ons Manager → Add-ons
Product: Toolkit → Tech Evangelism
Version: 60 Branch → Firefox 60
I guess the question is where do extensions look for native messaging hosts files and is there something we can do in the snap to map those to a directory outside the snap. I know we've done that with other things (downloads).
Flags: needinfo?(mozilla) → needinfo?(jlorenzo)
Possible locations for native messaging manifests are documented at: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_manifests#Manifest_location
I manage flareget development. The workaround proposed in comment 4 should work. If the location of the manifest file for firefox-snap is agreed upon, and documented in https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_manifests#Manifest_location will update the deb package accordingly. Can someone confirm the location where Firefox snap would look for the manifest json?
Per comment 4 and , I think this location: > ~/.mozilla/native-messaging-hosts/<name>.json should work. What do you all think?  https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_manifests#Manifest_location
I copied com.flareget.flareget.json to ~/snap/firefox/common/.mozilla/native-messaging-hosts/, and I modified its path entry to point to ~/snap/firefox/current/.local/bin/flareget-chrome-host, which I copied in that location. Flareget doesn't seem to be working though. How can I check whether firefox sees it? @adnan.kamili: snaps are not permitted to see the host filesystem, all they see is a subset of the user's home directory, so the addon will have to be installed there (somewhere under ~/snap/firefox), and a deb package is not the right tool for installing files in the user's home directory.
First of all, make sure that the flareget-chrome-host is running, when you start firefox, you can check that in the processes list. If ~/snap/firefox/current/.local/bin/flareget-chrome-host location works, flareget-chrome-host should appear in the processes list. flareget-chrome-host if running invokes flareget with the download url. The native host invokes flareget using: QProcess::startDetached("flareget",args); The above code assumes that flareget is installed in /usr/bin or any other path which is in the PATH env variable.
I am not seeing flareget-chrome-host running after starting firefox, and no associated denials in journalctl either. $ grep path /home/osomon/snap/firefox/common/.mozilla/native-messaging-hosts/com.flareget.flareget.json "path": "/home/osomon/snap/firefox/current/.local/bin/flareget-chrome-host", $ ls -lh /home/osomon/snap/firefox/current/.local/bin/flareget-chrome-host -rwxr-xr-x 1 osomon osomon 17K mai 24 11:26 /home/osomon/snap/firefox/current/.local/bin/flareget-chrome-host I suspect the snap isn't really looking for the manifest in $HOME/snap/firefox/common/.mozilla/native-messaging-hosts. @jlorenzo: how can I debug that? Is there a way to get logs for the lookup of extensions at startup?
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.