Red Hat Bugzilla – Bug 1467130
Firefox unable to handle magnet links
Last modified: 2018-05-29 07:31:55 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.
Can no longer reproduce with Firefox 58.0.2
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.