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

Error: LS-005 when adding torrents or magnet links. #1085

Closed
CatKiller opened this issue Feb 24, 2018 · 20 comments
Closed

Error: LS-005 when adding torrents or magnet links. #1085

CatKiller opened this issue Feb 24, 2018 · 20 comments
Assignees
Labels

Comments

@CatKiller
Copy link

Hi,

I've been successfully using transmission-remote-gui v5.14 on Mac OS 10.12.6 connecting to transmission-daemon 2.93 (3c5870d4f5) on Arch Linux on a local LAN. I can add torrents and magnet links, but whenever I do so, I always get an popup error message "Error: LS-005. Please contact the developer". The error does not seem to prevent me from actually starting the transfer, and looking through Please see attached screenshots. Looking in main.pas:2548 it seems to be related to the destination directory. Not sure why, both my "download-dir" and "incomplete-dir" settings on the daemon are set to the same writeable local directory /raid5_volume/Downloads_BT.

Any idea what is going on?

screen shot 2018-02-24 at 12 35 17
screen shot 2018-02-24 at 12 36 30

@silentlexx
Copy link

Same here. Transmission daemon work on Asus RT-AC56U, client on Mac OSX Sierra.

@cam8001
Copy link

cam8001 commented Feb 28, 2018

Exactly the same here.

Remote (on local lan):

#  uname -a
Linux finn 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u2 (2018-02-21) x86_64 GNU/Linux
#  transmission-daemon --version
transmission-daemon 2.92 (14714)

Local:

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.3
BuildVersion:	17D102

Remote GUI 5.14 build bb79014

@leonsoft-kras
Copy link
Contributor

as usual unhappy and sad maс os. I don't yet understand what is happening with the program in this operating system. A code of 5 lines causes a crash only in this sad OS. :))

Perhaps there is a reason in the open source compiler for this system.
I'll try to change the code to the next release.

@CatKiller
Copy link
Author

To be fair, it doesn't crash the application and after clicking 'OK' the transfer starts anyways, so it's more an annoyance than a major bug.

@leonsoft-kras
Copy link
Contributor

This is a serious mistake, because I enclosed the code in try-cath. Without this protection, the program would immediately crash. Protection allows you to continue execution.

@CatKiller
Copy link
Author

I saw that, but is that in order to work around the problem in the first place? Any idea what the exception is (if it was raised)? Maybe there's a way to fix it fully. I could try and do so if I find a way to compile the program.

@leonsoft-kras
Copy link
Contributor

I entered protection from the failure for other reasons. Possible problems in maсos are:

  1. Items.Insert - Items.IndexO;
  2. SysUtils.Date;

There is nothing to cause a mistake.
The situation is strange, because this code works as planned in Windows and Linux.

@g000phy
Copy link

g000phy commented Mar 9, 2018

I got rid of this error. Basically, I had to manually type in the destination folder path, but here are my steps:
After a clean install, I had a situation very similar to the screenshot above. Except I already had a number of active jobs on my NAS. All my downloads go to "/media/Share/Downloads" (this is the correct path on my NAS) and it was there when I opened Transmission options. The path for incomplete files was also there "/media/Share/_incomplete". But before I got to this window I had to get rid of the error message. So for the path, I typed "/Downloads" and the job started normally. The incomplete file appeared as it should in "_incomplete" folder but after it was finished, the files moved to, I guess, some newly created folder. I moved files to the correct folder "/media/Share/Downloads" using transmission (Set data location... in the context menu). And for the next job I added, I got the same error but typed "/media/Share/Downloads" for the destination. It worked smoothly and everything ended up where it should. When I added some more jobs afterward I got no error and the correct destination by default.
I guess Remote GUI app may not read some setting properly which causes the error.

@CatKiller
Copy link
Author

Hi @g000phy! You nailed it! That exception raised (error LS-005) is all about the destination directory:

      s:=CorrectPath (UTF8Encode(args.Strings['download-dir']) );
      try
        if cbDestFolder.Items.IndexOf(s) < 0 then begin
          pFD    := FolderData.create;
          pFD.Hit:= 1;
          pFD.Ext:= '';
          pFD.Txt:= s;
          pFD.Lst:= SysUtils.Date;
          cbDestFolder.Items.Insert(0, s);
          i := cbDestFolder.Items.IndexOf(s);
          cbDestFolder.Items.Objects[i]:= pFD;
        end;
      except
        MessageDlg('Error: LS-005. Please contact the developer', mtError, [mbOK], 0);

When you first open a torrent or magnet link, you'll notice that the 'destination directory' is empty, and you're still able to click 'OK', add the torrent (with the LS-005 error message) and get it to start. As you pointed out, if you fill the 'Destination directory' once, that parameter gets saved in transgui.ini:

[AddTorrent.]
PeerLimit=256
FolderCount=1
Folder0=
FolHit0=2
FolExt0=
LastDt0=09.03.2018
Folder1=
FolHit1=-1
FolExt1=
LastDt1=
LastDownloadDir=

...and any future torrent download will pick it up from there, preventing the error LS-005 from being raised.
Once that has been set once, you can even safely disable the 'Prompt for download options when adding a new torrent' and the error LS-005 which used to be raised will no longer be thrown.

So in short, as you mentioned, in 'Download dir' you paste the download dir path on the server and the issue goes away.

Thanks a lot for finding this out! This now makes transmission remote GUI much nicer to use :)

@CatKiller
Copy link
Author

Note that the bug still exists, but the workaround is so simple and effective I think there's no point leaving this issue open. I'm very happy with the resolution anyways.

@leonsoft-kras
Copy link
Contributor

leonsoft-kras commented Mar 10, 2018

I'll see when the time comes. :)
thanks!

@leonsoft-kras leonsoft-kras self-assigned this Mar 10, 2018
@gkovacsp
Copy link

gkovacsp commented Jul 7, 2018

Where can I find the transgui.ini on macOS?

@CatKiller
Copy link
Author

On Mac it's in /Users//.config/Transmission Remote GUI/transgui.ini

@CatKiller
Copy link
Author

Something didn't work well, so in your home directory: .config/Transmission Remote GUI/transgui.ini

Note that this is an invisible directory

@gkovacsp
Copy link

gkovacsp commented Jul 7, 2018

The workaround does not seem to work for me.
I've deleted the ini file, started the GUI, re-added my server
Tried to add the first torrent, error came
Typed in the address from blank, it started to work
Quit, start again
Tried to add the second torrent, error came again

@CatKiller
Copy link
Author

Odd, did you make sure that LastDownloadDir= was set correctly in your ini file?

@gkovacsp
Copy link

gkovacsp commented Jul 7, 2018

Yes, this is in the .ini file, it is a valid path on my NAS:
LastDownloadDir=/mnt/HD/HD_a2/Media/Sorozatok/Gabor

@CatKiller
Copy link
Author

Sorry to hear that, not sure why it is happening for you :/

@leonsoft-kras
Copy link
Contributor

The error has been fixed. I dont know your version of the TRGUI.

The error was in the function cbDestFolder.Items.Insert (0, s);
It has long been replaced with cbDestFolder.Items.Add (s);

Whoever has a problem with LS-005 is no longer receiving this message.

@gkovacsp
Copy link

gkovacsp commented Jul 8, 2018

You are absolutely right, the update did not go through because macOS did not let it, it needed one more confirmation and I was still running the old version.
Sorry for bothering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

6 participants