Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is not working on firefox. #59

Open
abdusemiabduweli opened this issue Oct 15, 2021 · 22 comments
Open

This is not working on firefox. #59

abdusemiabduweli opened this issue Oct 15, 2021 · 22 comments

Comments

@abdusemiabduweli
Copy link

Firefox is still using its own dowloader.

@dgsmiley18
Copy link

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

@thrzl
Copy link

thrzl commented Oct 22, 2021

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

@AyoungDukie
Copy link
Contributor

AyoungDukie commented Nov 2, 2021

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
Copy link

thrzl commented Nov 2, 2021

Setting the RPC server port to 16800 worked for me.

@abdusemiabduweli
Copy link
Author

Setting the RPC server port to 16800 worked for me.

could you tell me where this setting is?

@gautamkrishnar
Copy link
Owner

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

@thrzl
Copy link

thrzl commented Nov 3, 2021

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

@AyoungDukie
Copy link
Contributor

@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
Copy link

thrzl commented Nov 3, 2021

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
Copy link

hthre7 commented Dec 7, 2021

Still don't work on firefox v21.12.6

@AyoungDukie
Copy link
Contributor

AyoungDukie commented Oct 16, 2022

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
Copy link
Contributor

AyoungDukie commented Oct 16, 2022

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

AyoungDukie commented Jan 15, 2023

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
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

pureiboi commented Jul 3, 2023

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.

async function createOffscreen() {
if (await chrome.offscreen.hasDocument?.()) return;
await chrome.offscreen.createDocument({
url: 'pages/offscreen.html',
reasons: ['BLOBS'],
justification: 'keep service worker running',
});
}
// a message from an offscreen document every 20 second resets the inactivity timer
chrome.runtime.onMessage.addListener((msg) => {
if (msg.keepAlive) console.log('keepAlive');
});

@10kmotorola
Copy link

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.

pureiboi added a commit to pureiboi/motrix-webextension that referenced this issue Jul 9, 2023
pureiboi added a commit to pureiboi/motrix-webextension that referenced this issue Jul 9, 2023
pureiboi added a commit to pureiboi/motrix-webextension that referenced this issue Jul 9, 2023
pureiboi added a commit to pureiboi/motrix-webextension that referenced this issue Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants