Red Hat Bugzilla – Bug 1467130
Firefox unable to handle magnet links
Last modified: 2017-10-13 20:23:30 EDT
Created attachment 1293693 [details]
Error message after clicking a magnet link
Description of problem:
Firefox doesn't set a magnet handler, despite having Transmission torrent client installed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run Firefox
2. Find a place to download from a magnet link
3. Try to download it
Every time I click a magnet link, I am redirected to a white page with an error message saying it couldn't find a handler for it.
It is expected to run Transmission right after clicking the magnet link, and no prompts appear whatsoever.
I have already deleted my profiles and reset Firefox to default settings, also reinstalled both Firefox and Transmission. No change. This is a recently installed clean Fedora 25 with no fancy modifications and no extra repos.
SELinux doesn't show any warning.
Created attachment 1293694 [details]
"Applications" section on Firefox showing no magnet entry
Could you please try if the xdg-open opens transmission from command line?
xdg-mime query default x-scheme-handler/magnet
It opened Transmission, but nothing more. It couldn't open the magnet.
Here's the output:
[alquimista@alq14 ~]$ xdg-open 'magnet:?xt=urn:sha1:6de6a83d402817ef5116d28072f9dd6b0600c6d6&dn=OOo_2.1.0_LinuxIntel_install_en-US.tar.gz&xs=http://mirror.switch.ch/ftp/mirror/OpenOffice/stable/2.1.0/OOo_2.1.0_LinuxIntel_install_en-US.tar.gz'
(transmission-gtk:4883): GLib-CRITICAL **: g_file_test: assertion 'filename != NULL' failed
** Message: Skipping unknown torrent
The second command:
[alquimista@alq14 ~]$ xdg-mime query default x-scheme-handler/magnet
I'm running 26 now. Clean install.
I just realized the magnet you gave me isn't working, so I tried with another:
[alquimista@alq14 ~]$ xdg-open 'magnet:?xt=urn:btih:c8386c4211bff55f9c191323fed96ce142507732&dn=Steve+Roach+-+New+Life+Dreaming&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969'
(transmission-gtk:5518): GLib-CRITICAL **: g_file_test: assertion 'filename != NULL' failed
It worked now. Transmission opened, asking me where to save the files.
It started working today, after applying a few updates. Did you fix it?
No actually, I was not able to reproduce it. Please reopen if reoccurs.
Same thing, again. It's so random.
I reinstalled Fedora Workstation 26 on both of my laptops, then I updated the installs and rebooted; and installed Transmission. After that I kept failing to open magnet links on both. Firefox doesn't know what to do with magnets. I don't think there's anything I can tell I did to make it work. Completely random to me.
Any other output I can get?
I'm having the same issue with Firefox 55 and qBittorrent on F26.
It's been broken for some time. I can't recall if it's worked since the upgrade to F26, but it was definitely working in F25.
I can confirm
Doesn't matter what bittorrent client. Even manually adding `network.protocol-handler.expose.magnet` which is an oft-cited fix for this doesn't do anything. There is no magnet association.
What actually does work is adding:
(be careful it's minified, so I used `python -m json.tool < handlers.json` and output a temporary file to edit by hand first, then copy it over handlers.json (or keep a backup) - firefox will re-minify it upon restarting.)
You can then go into Preferences -> Applications and set the magnet application to your liking.
Not really sure why this is messed up to begin with, though.
This might be related to the https://bugzilla.mozilla.org/show_bug.cgi?id=1297686 I'm working on the support for obtaining list of scheme handlers from GIO, but it will take a while until it will be ready.
I'm able to reproduce in rawhide, so I'll try to look into it.
I was able to reproduce this with Arch Linux, Ubuntu 17.04 and many other distros with updated Firefox versions. I reported upstream here:
But I couldn't do what they asked me to do.
This is the upstream bug where we actually started debugging it: https://bugzilla.mozilla.org/show_bug.cgi?id=1400803
Please check if disabling e10s helps there, to disable e10s go to about:config
and set browser.tabs.remote.autostart to false.
Magnet links have started working again for me - now on firefox-56.0-4.fc26.x86_64. It may have been fixed in a previous minor version, but I haven't tested opening a magnet link until just now.
Just updated my F26 Workstation and got firefox-56.0-4.fc26.x86_64, but magnet links did NOT start working for me.