motrix-webextension icon indicating copy to clipboard operation
motrix-webextension copied to clipboard

This is not working on firefox.

Open abdusemiabduweli opened this issue 2 years ago • 22 comments

Firefox is still using its own dowloader.

abdusemiabduweli avatar Oct 15 '21 14:10 abdusemiabduweli

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

dgsmiley18 avatar Oct 17 '21 21:10 dgsmiley18

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

thrzl avatar Oct 22 '21 20:10 thrzl

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

AyoungDukie avatar Nov 02 '21 17:11 AyoungDukie

Setting the RPC server port to 16800 worked for me.

thrzl avatar Nov 02 '21 23:11 thrzl

Setting the RPC server port to 16800 worked for me.

could you tell me where this setting is?

abdusemiabduweli avatar Nov 03 '21 01:11 abdusemiabduweli

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

gautamkrishnar avatar Nov 03 '21 09:11 gautamkrishnar

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

thrzl avatar Nov 03 '21 10:11 thrzl

@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?

AyoungDukie avatar Nov 03 '21 12:11 AyoungDukie

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.

thrzl avatar Nov 03 '21 12:11 thrzl

Still don't work on firefox v21.12.6

hthre7 avatar Dec 07 '21 12:12 hthre7

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 avatar Oct 16 '22 18:10 AyoungDukie

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

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 ["<all_urls>"], 
        must either [
            match the pattern /^(https?|wss?|file|ftp|\*):\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$/, 
            or match the pattern /^file:\/\/\/.*$/
        ], 
        or match the pattern /^resource:\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$|^about:/
    ]

AyoungDukie avatar Oct 16 '22 19:10 AyoungDukie

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 avatar Oct 16 '22 21:10 AyoungDukie

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!

AyoungDukie avatar Nov 06 '22 17:11 AyoungDukie

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.

marione44 avatar Jan 12 '23 12:01 marione44

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

AyoungDukie avatar Jan 14 '23 18:01 AyoungDukie

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.

marione44 avatar Jan 15 '23 11:01 marione44

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 avatar Jan 15 '23 18:01 AyoungDukie

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!

AyoungDukie avatar Jan 15 '23 19:01 AyoungDukie

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.

marione44 avatar Jan 15 '23 19:01 marione44

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

pureiboi avatar Jul 03 '23 15:07 pureiboi

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.

mariospicross avatar Jul 05 '23 05:07 mariospicross