gautamkrishnar / motrix-webextension

A browser extension for the Motrix Download Manager
GNU General Public License v3.0
1.21k stars 97 forks source link

This is not working on firefox. #59

Open abdusemiabduweli opened 2 years ago

abdusemiabduweli commented 2 years ago

Firefox is still using its own dowloader.

dgsmiley18 commented 2 years ago

It's not working on Firefox, but it still works on Edge and Chrome.

thrzl commented 2 years ago

I can confirm I have the same issue; Firefox still uses the default downloader.

AyoungDukie commented 2 years ago

To add info, this doesn't occur everytime, but occasionally will create an entry in the browser console showing the following:

Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist.        2 background.js:2455   
     send moz-extension://720bc3cd-601b-4cd5-9acc-4b8bd6842b8a/background.js:2455

image

thrzl commented 2 years ago

Setting the RPC server port to 16800 worked for me.

abdusemiabduweli commented 2 years ago

Setting the RPC server port to 16800 worked for me.

could you tell me where this setting is?

gautamkrishnar commented 2 years ago

@abdusemiabduweli open motrix go to settings>advanced and try factory reset and try setting the key again.

thrzl commented 2 years ago

@abdusemiabduweli right click the extension > manage extension > 3 dot menu > options > RPC Servers > Default Server image

AyoungDukie commented 2 years ago

@abdusemiabduweli right click the extension > manage extension > 3 dot menu > options > RPC Servers > Default Server image

This does not appear to be an option from the Add-ons Manager in Firefox 94; the 3 dot menu only has Remove or Report as options: image

Is there another way to surface these options?

thrzl commented 2 years ago

Sorry, forgot that I started using the Aria2 Download Manager. That is what works for me, but I think the Motrix WebExtension just needs to be updated.

hthre7 commented 2 years ago

Still don't work on firefox v21.12.6

AyoungDukie commented 1 year ago

I posted this in a different but similar issue, so to bring here as an FYI (at least for 22.10.5):

Just as a data point, I am not the poster but have personally been able to get this to work in the latest version when the following criteria are met:

  • The Browser Extension and the Desktop App have the RPC Key set
  • "Prompt Before Download" Is disabled
  • The file meets download size and blacklist criteria

At the moment, unfortunately, the Blacklist and File Size filtering seem to work (e.g. stop from sending a Motrix download request), however they seem to stop the browser download from happening at all. I will open separate issues about this and the Prompt before Download setting, but seemed worthwhile to note that the new updates have enabled a successful download workflow for Firefox

Edit: Updated documentation on issues with these settings via the new documentation page for the extension Settings: https://github.com/gautamkrishnar/motrix-webextension/blob/master/settings-documentation.md

AyoungDukie commented 1 year ago

For reference, I began checking into doing some debugging for the above-mentioned secondary issues. When I look at the extension's entry under about:debugging, the error below indicates problems with manifest permission for download.shelf permission (which seems like it would need to be downloads.open for a FF add-on? doesn't apply to a FF add-on):

Issue Screenshots/Error Info ![image](https://user-images.githubusercontent.com/5449443/196052541-a73864c8-e01c-44b4-b00b-8f37f276f7b7.png) My Attempted formatting for readability: ``` Warning details Reading manifest: Warning processing permissions: Error processing permissions.1: Value "downloads.shelf" must either: must either [ must either [ must either [ be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], be one of ["scripting"], or be one of ["webRequest", "webRequestBlocking", "webRequestFilterResponse.serviceWorkerScript"] ], must either [ be one of ["mozillaAddons"], be one of ["normandyAddonStudy"], be one of ["urlbar"], be one of ["activityLog"], be one of ["networkStatus"], or be one of ["telemetry"] ], be one of ["alarms", "storage", "unlimitedStorage"], be one of ["captivePortal"], be one of ["identity"], be one of ["menus", "contextMenus"], be one of ["geckoProfiler"], be one of ["contextualIdentities"], be one of ["dns"], or be one of ["theme"] ], must either [ must either [ be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], be one of ["scripting"], or be one of ["webRequest", "webRequestBlocking", "webRequestFilterResponse.serviceWorkerScript"] ], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"] ], or match the pattern /^experiments(\.\w+)+$/ ], or must either [ be one of [""], must either [ match the pattern /^(https?|wss?|file|ftp|\*):\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$/, or match the pattern /^file:\/\/\/.*$/ ], or match the pattern /^resource:\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$|^about:/ ] ```
AyoungDukie commented 1 year ago

Did some brief testing with the chromium extension using MS Edge, and this does not seem to be having the same issue (at least about manifest issues) on the latest store version 22.1.7.

Looking at this manifest permission issue, Chrome does shows the downloads.shelf permission for hiding the download bar at the bottom of the browser, but this is not supported in FF.

Mozilla has an article about shared/Universal WebExtension builds, and they recommend keeping separate Manifest versions for the respective builds in order to avoid that issue.

This doesn't seem to make much difference though, as I have gone ahead and made a local copy of the extension where I repacked with the downloads.shelf permission removed. At least when installing this via the about:debugging toolset (as a temporary add-on), this resolves that warning from above.

I need to do more testing, because I can't fully tell if it is now respecting filter settings, or if there is some confounding thing going on. It just still doesn't seem consistent about the file size and/or extension filters

AyoungDukie commented 1 year ago

All, there is now a documentation page explaining some of the settings that can cause silent failures on Firefox. If folks who are having this issue can verify the settings that they are using, it can help verify if there is a new/undiagnosed problem!

marione44 commented 1 year ago

Is there any fix yet? I followed the advice on this issue and others but still not working on ubuntu 20.04, tried it on Xubuntu 22.04 and everything is working fine.

AyoungDukie commented 1 year ago

Interesting, were motrix, firefox, and the extension all the same versions? Also what settings for the extension were you using on the 20.04 install? Lastly, can you verify that the RPC secret was matching? You may have to reset the extension to change the key there

marione44 commented 1 year ago

Motrix and firefox were all the same versions. I built them manually and tried even the snap version, same result on Xubuntu 22.04 works fine, on Ubunutu 20.04 is not working at all. I set different RPC all were matching, i tried to reset boht extension and motrix. I should add that i noticed a weird behaviour, i uninstalled motrix but forgot to remove the extension, without the package installed the extension do intercept the files to download.

AyoungDukie commented 1 year ago

Hm, I personally haven't used it in Linux yet, but that seems odd that 20.04 would have that issue, but 22.04 wouldn't... As I understand, yarn/node are the only dependencies for building, so that would be theoretically similar for building from source, and the app image/snap/flatpak of the main app should behave identically...

If you get a chance to look at it, would you be able to open the debugger/console for the extension and see what errors/warnings it throws when starting a download?

If not, no worries, this bug can/will stay open so others can note if they still have problems

AyoungDukie commented 1 year ago

Small update here, I have only been able to check the App Image version of Motrix so far, but have been able to get this to work on Fedora 37. Not sure what the manual build would cause differently on 20.04 vs 22.04, but perhaps there is an issue with electron/node/yarn versioning there. I would recommend using the App Image on your 20.04 machine to see if the same issue occurs. Currently the Motrix Flatpak is not working, so I cannot check that, and I am not in an optimal position to check the Snap personally (though I would also be curious if it similarly works for you on 22.04 but not 20.04).

If someone else is able to test via the snap version, let me know!

marione44 commented 1 year ago

I tried debugging it beside the manifest permission for download.shelf error you mentioned in this issue everything else work fine. Since when i had installed Motrix the extention wont intercept any download i tried uninstalling it and without the app it intercept the downloads. This time i tried to install Motrix using apt instead of nala and seems to work, i dont know how and if its related to the issue since when i installed it with snap didnt work either.

pureiboi commented 1 year ago

it's not working for me too on firefox.

isit related to chrome api that is not supported in firefox?

image

this is what i found in terms of browser namespace

image

EDIT:

I think this is the root cause. after i updated it from chrome to browser and it works for firefox after that.

https://github.com/gautamkrishnar/motrix-webextension/blob/468bbfde017ecc1919768d38028dad6e8e5650e1/app/scripts/background.js#L207-L218

10kmotorola commented 1 year ago

Adding it into Firefox with the above fix just gives the following error for me.

Reading manifest: Warning processing action.browser_style: "browser_style:true" has been deprecated in Manifest Version 3 and will be unsupported in the near future.