Transmission doesn't open torrents via Firefox 3

Bug #204184 reported by slamdunk
22
Affects Status Importance Assigned to Milestone
Transmission
Fix Released
Unknown
transmission (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I don't know if cause is firefox or transmission, however sometimes, when I click on a torrent file link via Firefox and open it with transmission (for example in http://torrent.ubuntu.com:6969/) it's not open. And so I need to re-click on same link. This happens when transmission is already open and it's downloading another file.

Revision history for this message
slamdunk (antongiulio05) wrote :

Problem repeated when a torrent-file is saved locally. And so it's not firefox related but a transmission bug only.

Revision history for this message
M Willis Monroe (willismonroe) wrote :

Just tried downloading two torrents with Transmission 1.06 (5136) and Firefox 3.0b4 and it worked perfectly.

Changed in transmission:
status: New → Incomplete
Revision history for this message
slamdunk (antongiulio05) wrote :

This bug is not easily reproducible. It happens many times but not always.

Try this:

download locally 2/3 torrent files.

Start one torrent file. When downloading is started reduce transmission to tray-icon and open a new torrent file.

Many times happens for me that file is not loaded.

Revision history for this message
John Dong (jdong) wrote :

I have seen this bug too. It only happens in some specific state with regards to the # of torrents running, if the Transmission window is active, minimized, or trayed, etc. I don't have suggestions for figuring out exactly why it happens but it certainly does happen.

Changed in transmission:
status: Incomplete → Confirmed
Changed in transmission:
importance: Undecided → Low
Revision history for this message
Charles Kerr (charlesk) wrote :

The steps to open a torrent have changed a lot between 1.06 and 1.10. Could someone who's able to reproduce this give it a go with http://download.m0k.org/transmission/files/transmission-1.10b1.tar.bz2 and see if the problem persists?

Revision history for this message
slamdunk (antongiulio05) wrote :

@charles

I have downloaded and compiled (like in README) version 1.10b1

Now, when you open a torrent file, there is a dialog that permit to select single file for multi files torrent.

However problem persists, I have downloaded random torrents and any torrent was not opened.

Revision history for this message
VF (vfiend) wrote :

I used to have this bug all the time with pre-1.0 Transmissions, seems fine for me now though.

Revision history for this message
Erich Jansen (erichjansen-deactivatedaccount) wrote :

Confirming that bug is still present for Hardy Beta. Why is this a low priority bug?

Changed in transmission:
status: Unknown → Confirmed
Revision history for this message
Adal Alom Rodríguez (arpia49) wrote :

Still happens (Hardy updated today).

Revision history for this message
Jonas Alves (jonasfa) wrote :

Still hapens on Hardy release full-updated

Revision history for this message
Tristan Hill (stan) wrote :

strace -e trace=process -f firefox indicates that firefox is trying to start transmission as transmission-gtk. at least for me, manually pointing it at /usr/bin/transmission seem to make it do the right thing.

Revision history for this message
Charles Kerr (charlesk) wrote :

Could the other reporters please try Tristan's suggestion and see how that goes?

The development branch is reaching 1.20 -- which has a vastly different codebase than 1.06 -- and I'm no longer able to reproduce this bug.

Revision history for this message
Trevor (launchpad-trevorcreech) wrote :

I can confirm that Tristan's solution worked for me on the latest updated Hardy.

Changed in transmission:
status: Confirmed → Fix Released
Changed in transmission:
status: Fix Released → New
Revision history for this message
fx5 (packaging) wrote :

I found out that deleting
~/.local/share/applications/transmission-gtk-usercustom.desktop
fixes the problem for me.

Changed in transmission:
status: New → Fix Released
Revision history for this message
Paul Drain (pd) wrote :

I found that I had this problem on a vanilla 8.04.1 install with the 'epiphany-browser' and 'ubuntu-restricted-extras' packages installed. I could easily reproduce it on the Transmission in hardy-updates, as well as intrepid, as well as a self-built (using pbuilder) 1.22 version by downloading two (or more) torrents, removing one, then attempting to download a new one.

One - Two - Three - [Three]
^ ^ ^ ^
Worked Worked Failed Worked

Where [Three] is the same .torrent download, after removing the second one.

My .xsession-errors file came up with:

GCJ PLUGIN: thread 0x816c470: NP_GetMIMEDescription
GCJ PLUGIN: thread 0x816c470: NP_GetMIMEDescription return
GCJ PLUGIN: thread 0x816c470: NP_GetValue
GCJ PLUGIN: thread 0x816c470: NP_GetValue: returning plugin name.
GCJ PLUGIN: thread 0x816c470: NP_GetValue return
GCJ PLUGIN: thread 0x816c470: NP_GetValue
GCJ PLUGIN: thread 0x816c470: NP_GetValue: returning plugin description.
GCJ PLUGIN: thread 0x816c470: NP_GetValue return

Each time I downloaded a .torrent that didn't appear in Transmission, I use Epiphany as my main browser and the settings are the defaults, including the "Automatically download and open files" being ticked.

Tristan's solution initially didn't work for me, my eventual fix was two-fold:

I had to uninstall the openjdk packages (openjdk-6-jre) and install the Sun Java packages instead (sun-java6-bin), then run 'update-java-alternatives -s java-6-sun' to make the errors disappear, but it just made the error appear after the 5th, or 6th torrent, rather than the third.

I then changed the default MIME type to point to a custom application called "/usr/bin/transmission", restarted my session and found it worked with Firefox 3.x and Epiphany 2.22.x.

I then re-installed the openjdk-6-jre libraries (in order to test it wasn't the MIME change alone that caused it) and Transmission started bailing on the same conditions as it did originally.

Only question is, i've got no idea why downloading a .torrent would spawn the GCJ plugin?

Revision history for this message
Adam Williamson (awilliamson) wrote :

This issue also occurs on Mandriva. It's not related to any kind of transmission-gtk naming / desktop file / whatever issue for us, as it's never been called that in our package.

I have brought this up with upstream. We believe it's a race condition between Firefox and Transmission. Briefly, from 1.30 on, when Transmission is already running and something runs 'transmission sometorrent.torrent', a second transmission instance spawns, passes the torrent filename on to the first via DBus, then shuts down again. We believe that when it shuts down, Firefox then deletes the .torrent file as it thinks the operation is complete. So if the first instance of Transmission doesn't manage to pick everything up before Firefox deletes the temporary file, the bug happens.

Upstream will look at fixing this by passing the entire torrent metainfo over DBus rather than just passing the filename and relying on it still being there for the first instance to look at.

Since 1.30 this is actually technically a different bug from what was first reported both here and upstream, just to avoid confusion.

Revision history for this message
Adam Williamson (awilliamson) wrote :

This is fixed in upstream SVN, should be fixed in the next release. It is also fixed in the current Mandriva package.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I can not reproduce with 1.32-1ubuntu1

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

transmission (1.33-0ubuntu1) intrepid; urgency=low

  * New upstream release (LP: #260370)

 -- Nick Colgan < <email address hidden>> Fri, 22 Aug 2008 16:12:44 -0400

Changed in transmission:
status: Confirmed → Fix Released
Revision history for this message
ski (skibrianski) wrote :

Is the mandriva patch against 1.06 or earlier? If so, a new package for hardy would be very nice. It is LTS release after all.

Revision history for this message
ski (skibrianski) wrote :

I worked around this by compiling intrepid's version of transmission (1.34) with hardy libs (there
are some handy features in 1.34 that are worth having in addition to this bugfix)

#get intrepid 1.34 source package (assuming you have deb-src lines in /etc/apt/sources.list)
cd /tmp
sudo sed -i s/hardy/intrepid/ /etc/apt/sources.list
sudo apt-get update
sudo apt-get source transmission
sudo sed -i s/intrepid/hardy/ /etc/apt/sources.list
sudo apt-get update

#install build-deps, among them: libssl-dev libcurl4-openssl-dev libgtk2.0-dev build-essential
# (you might need others)
sudo apt-get install libssl-dev libcurl4-openssl-dev libgtk2.0-dev build-essential

# build and install
sudo chown -R `whoami` transmission-1.34
cd transmission-1.34
sh configure --enable-gtk --enable-libnotify --enable-cli --prefix=/usr && make && sudo make install

# pin transmission:
echo transmission-common hold | sudo dpkg --set-selections
echo transmission-gtk hold | sudo dpkg --set-selections

# then clean up build dependencies you don't want lying around, source files, etc.
# note that when you upgrade to the next ubuntu version you'll probably need to unpin transmission

pin transmission:
echo transmission-common hold | sudo dpkg --set-selections
echo transmission-gtk hold | sudo dpkg --set-selections

Good luck!

Revision history for this message
ski (skibrianski) wrote :

Ack. On further investigation this only works the first time you add transmission. When you try to add a torrent with transmission already running you get the error: "transmission is already running". Fiddling with transmission-daemon and transmission-remote doesn't seem to help. Are folks sure this is really fixed in intrepid?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.