Unofficial Deluge 2.0.x for Windows installer

Specific support for Deluge on Microsoft Windows OS
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2.0.x for Windows installer

Post by mhertz »

Hey, thanks alot mate, appreciate the advice, honestly newer knew of such, but just read up and checked that it's easy enough to do on Linux, which I'll add to my regular lmt setup with various tweaks for optimizing battery. Thanks! :)
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: Unofficial Deluge 2.0.x for Windows installer

Post by bengalih »

Hey. I'm having a couple of problems.

1) First issue is that launching the client on my Windows 10 system doesn't work properly. I just did a fresh install of the latest release (deluge-2.0.3-lt1.2.10-boost1.74-py3.8.5-ossl1.1.1g-GTK3.24.23) and when I launch what happens is that deluge.exe appears in task manager, but no GUI appears. It also seems to slow my system down incredibly for about 30 seconds. Then, things seem to return to normal and at some point over the next say 5-20 minutes it will suddenly open the GUI. I've been having this issue for a while and sort of getting around it by just using the webclient to my server, but that is also an issue (see below). I have this installed on another box as well (Server 2016) and I don't seem to have the problem opening it from there.
I have fully uninstalled and deleted the appdata before reinstall and I continue to have this issue. Clearly there is something on this system, but I have no problems with any other applications and I really don't want to rebuild this box but I need the client working.

2) This is more of a problem since I can't really use the GUI I am using the webclient to access my server running on the 2016 box. Whenever I used a magnet URL to add a torrent it works fine, however if I use a torrent file to upload I get a "Not a Valid Torrent" error after the file uploads. I know the files are good because they work fine with the GUI client (when I can get it to load).

So I really have no good path to continue to keep using any client to add torrent files which is really rough.

Advice?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2.0.x for Windows installer

Post by mhertz »

You could test my build which has newer versions of gtk, libtorrent, python and openssl etc and little better isolation for outside interference, e.g. test in portable install mode(you can just install into your home or downloads folder etc) and just delete installed folder afterwards if not helping and not needing wipe your current install for it.

viewtopic.php?f=12&t=55776&start=70#p232697

I'm affraid I don't know the cause of your issues, and am generally not good at fixing deluge bugs, sorry, so catch a debug-log of the issue and see if any errors logged and submit ticket at deluge bugtracker to hopefully get looked into at some time later.

Do same for the webUI issue, so include also deluge-web debug-log - I couldn't reproduce myself though and tested latest iso's of arch and debian, each tested in both local-file and url.

Check also just in case with 2.0.4.dev38, again you can just use portable mode to avoid conflicts or extra work to uninstall/install.

EDIT: If webUI cannot add torrent for you, but e.g. deluge-console can, then you could make a batch-file and place into your "SendTo" folder, for rightclicking a torrent and selecting: "Send to > deluge.cmd". Such batch-file should then include e.g.:

Code: Select all

"%programfiles%\Deluge\deluge.exe" "connect <ip[:port]> [username] [password] ; add $1"
If above works, could also be added instead into registry to make little faster clicking to activate from context-menu, so adding a shell-handler to registry for torrent extension files, to rightclick torrent and select e.g. "Add torrent".
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2.0.x for Windows installer

Post by mhertz »

@all, If wanting to have the bottom shown tabs horizontal instead of vertical in deluge2, just like deluge1 had, then change 'tab_pos' from 'left' to 'top' in 'INSTALL-DIR\Lib\site-packages\deluge\ui\gtk3\glade\main_window.ui', line 764, and also next line's 'show_border' option from 'False' to 'True'.

Then the horizontal line can be dragged up or down to make bigger or smaller tab section area to fit your preference and is usually remembered upon restart, but at times fails to regenerate at startup, which is a deluge2 bug, or gtk3 dunno, and if going into your deluge config folder and write-protect your gtk3ui.conf file('rightclick > properties > read-only'), then that should help I think - the setting there controlling this is 'tabsbar_position', where a lower value gives you a higher/bigger area and higher value a lower/shorter area. The value used when deluge is first started and such file doesn't exist(as upon first run, or after deleted profile-dir), is in 'INSTALL-DIR\Lib\site-packages\deluge\ui\gtk3\gtkui.py, line 124 named 'tabsbar_position' and default is '235'. Deluge saves into gtk3ui.conf at closing deluge and that file takes precedense i.e. tabsbar_position default value from gtkui.py is overridden at startup from the value in gtk3ui.conf - I don't know if saves wrong value in gtk3ui.conf at times or fails to read correct value at times, but if continuing having problems, then maybe try update in both places while write-protecting gtk3ui.conf(with correct value in first, of-course) and see if helps.
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: Unofficial Deluge 2.0.x for Windows installer

Post by bengalih »

mhertz wrote:You could test my build which has newer versions of gtk, libtorrent, python and openssl etc and little better isolation for outside interference, e.g. test in portable install mode(you can just install into your home or downloads folder etc) and just delete installed folder afterwards if not helping and not needing wipe your current install for it.

viewtopic.php?f=12&t=55776&start=70#p232697

I'm affraid I don't know the cause of your issues, and am generally not good at fixing deluge bugs, sorry, so catch a debug-log of the issue and see if any errors logged and submit ticket at deluge bugtracker to hopefully get looked into at some time later.

Do same for the webUI issue, so include also deluge-web debug-log - I couldn't reproduce myself though and tested latest iso's of arch and debian, each tested in both local-file and url.

Check also just in case with 2.0.4.dev38, again you can just use portable mode to avoid conflicts or extra work to uninstall/install.

EDIT: If webUI cannot add torrent for you, but e.g. deluge-console can, then you could make a batch-file and place into your "SendTo" folder, for rightclicking a torrent and selecting: "Send to > deluge.cmd". Such batch-file should then include e.g.:

Code: Select all

"%programfiles%\Deluge\deluge.exe" "connect <ip[:port]> [username] [password] ; add $1"
If above works, could also be added instead into registry to make little faster clicking to activate from context-menu, so adding a shell-handler to registry for torrent extension files, to rightclick torrent and select e.g. "Add torrent".
I know how to make a debug log for the daemon. How do I make a debug log for the local GUI? for the Web UI?

Your solution to adding the torrent with a batch file doesn't really work because of the issues I have launching the client. anything that involves launching deluge.exe is going to be problematic.

I'll try to get the logs up to bugtracker.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2.0.x for Windows installer

Post by mhertz »

Deluge-console doesn't use deluge.exe, but is a thinclient for deluged daemon, either localhost or remote. You need my build for that btw, as deluge-console don't work in petersasi's builds.

You enable debug-logging same with all binaries, e.g on windows for webUI: 'deluge-web -L debug -l %userprofile%\deluge-web.log' and log goes in your user folder. You could also start a deluge binary ending in '-debug' from a terminal(cmd-prompt) and run with '-L debug'' and copy/paste the output of terminal afterwards. The debug binaries gives little extra output in opened terminal which isn't captured in the file when defined to save to such, but usually isn't giving much extra info, but just in-case.
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: Unofficial Deluge 2.0.x for Windows installer

Post by bengalih »

mhertz wrote:Deluge-console doesn't use deluge.exe, but is a thinclient for deluged daemon, either localhost or remote. You need my build for that btw, as deluge-console don't work in petersasi's builds.

You enable debug-logging same with all binaries, e.g on windows for webUI: 'deluge-web -L debug -l %userprofile%\deluge-web.log' and log goes in your user folder. You could also start a deluge binary ending in '-debug' from a terminal(cmd-prompt) and run with '-L debug'' and copy/paste the output of terminal afterwards. The debug binaries gives little extra output in opened terminal which isn't captured in the file when defined to save to such, but usually isn't giving much extra info, but just in-case.
Sorry, I misunderstood. I guess I've never used deluge-console before. I assume it is a command-line based GUI for the daemon? But - does it work on Windows?

I figured out the debug log on my own. Part of the issue is that I use the option to run the WebUI from the GUI, so I didn't have a discrete exe to debug on. I disabled that and ran the web server standalone pointing to the same config directories my main daemon runs from. Unfortunately, while I did get an error it is totally non informative (for me):

Code: Select all

43:31 [INFO    ][twisted                    :154 ] "10.10.10.120" - - [15/Jan/2021:15:43:30 +0000] "POST /json HTTP/1.1" 200 59 "http://10.10.10.102:8112/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
09:43:31 [DEBUG   ][deluge.ui.web.json_api     :65  ] json-request: b'{"method":"web.update_ui","params":[["queue","name","total_wanted","state","progress","num_seeds","total_seeds","num_peers","total_peers","download_payload_rate","upload_payload_rate","eta","ratio","distributed_copies","is_auto_managed","time_added","tracker_host","download_location","last_seen_complete","total_done","total_uploaded","max_download_speed","max_upload_speed","seeds_peers_ratio","total_remaining","completed_time","time_since_transfer"],{}],"id":224}'
09:43:31 [INFO    ][twisted                    :154 ] "10.10.10.120" - - [15/Jan/2021:15:43:31 +0000] "POST /json HTTP/1.1" 200 317 "http://10.10.10.102:8112/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
09:43:35 [DEBUG   ][deluge.ui.web.server       :65  ] uploading files to C:\Users\XXXX\AppData\Local\Temp\delugeweb-a9ytgwqd
09:43:35 [DEBUG   ][deluge.ui.web.server       :65  ] uploaded 1 file(s)
09:43:35 [INFO    ][twisted                    :154 ] "10.10.10.120" - - [15/Jan/2021:15:43:35 +0000] "POST /upload HTTP/1.1" 200 131 "http://10.10.10.102:8112/" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
09:43:35 [DEBUG   ][deluge.ui.web.json_api     :65  ] json-request: b'{"method":"web.get_torrent_info","params":["C:\\\\Users\\\\XXXX\\\\AppData\\\\Local\\\\Temp\\\\delugeweb-a9ytgwqd\\\\tmpkvfkl534.torrent"],"id":225}'
09:43:35 [DEBUG   ][deluge.ui.common           :65  ] Attempting to open C:\Users\XXXX\AppData\Local\Temp\delugeweb-a9ytgwqd\tmpkvfkl534.torrent.
09:43:35 [ERROR   ][deluge.ui.web.json_api     :79  ] 'YYYYYY [20140930]/_README.txt'
BTW - I also did this with a clean config and tried multiple browsers. I have confirmed that the tmp files it references exist. And, in fact you can see it is able to open them because it is able to read at least the first file in the torrent (_README.txt"). However it doesn't give off any other information after that error (I did several tests and parsed out only the relevant log). Also, there doesn't seem to be anything in the GUI log that references the attempt.

I will try to get your version and see if the loading issue is resolved, and will also see if I can run it portable for daemon mode and run similar tests.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Unofficial Deluge 2.0.x for Windows installer

Post by mhertz »

Yeah sadly not very helpful indeed, as you stated. Is it all torrents or just that one, since it worked fine in my two tests. Maybe also run the deluged daemon with debug-logging and see if anything on that end. Sorry can not help you with this unfortunetly.

Yes, deluge-console works in my build.
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: Unofficial Deluge 2.0.x for Windows installer

Post by bengalih »

mhertz wrote:Yeah sadly not very helpful indeed, as you stated. Is it all torrents or just that one, since it worked fine in my two tests. Maybe also run the deluged daemon with debug-logging and see if anything on that end. Sorry can not help you with this unfortunetly.

Yes, deluge-console works in my build.
Ok - so...and forgive me if any of this sounds antagonistic...not meaning it to be and I appreciate all your help.
Firstly, are you/have you done these tests on a windows system? Right now I am using your latest dev build and installed in portable mode just on my laptop. All tests (including daemons) done from my laptop, so the box I was currently running my server on is out of the picture.

1) I figured out the deluge-console - however there is a pathing issue with it:

Code: Select all

C:\Users\me\Desktop\Deluge>deluge-console.exe "add C:\test\test.torrent"
C:\Users\Ben\Desktop\Deluge\testtest.torrent does not exist!

C:\Users\me\Desktop\Deluge>deluge-console.exe "add C:/test/test.torrent"
Attempting to add torrent: C:\test\test.torrent
Torrent added!
So I don't think (?) your batch option will work because windows will supply the path in the former format which will fail (as %1).

2) As far as the upload file issue - it still exists. Using just the portable install I started up a deluged-debug and deluge-web-debug with a fresh config. Again, this is not on the 2016 server I have been using, but simply my laptop - Windows 10 (instead of Server 2016) and just a second box to prove it isn't isolated to just one. And, in case I didn't mention I tried from Chrome and IE.
Anyway, I attached to the web over 8112 and attempted to upload a torrent and got the same invalid torrent and logs that I showed above.
deluged-debug with debug logs doesn't seem to show any additional info, but I will test one more time.

3) As far as the problems launching the GUI client..so weird:
I was able to get a launch of just deluge.exe using your portable build (although I first ran deluge-debug.exe and it seemed to just stop after a few lines of logging the first time or two. once I caught it said it didn't have config files, but that shouldn't matter because it should create them). Anyway after a run or two it seemed to launch consistently. What's interesting is after it seemed to work, I went back to launching my installed version and is seemed to be opening consistently.

However, as I was typing this I tried to run it again and got the old behavior. When this happens deluge shows in the task manager and literally my typing slows down to one character on the screen per second...slows down my whole system. This might last for 30 seconds or a couple of minutes.
If I kill the process tree from task manager it doesn't kill deluge.exe immediately. In fact it takes about another minute and if you try to kill it again during that time you get an error from task manager. I did similar runs from the command line and when it fails to run I CTRL-C out of it, but it doesn't totally die. It stays running for up to 5 minutes or so and gives me the continue error if I try to stop it with another CTRL-C:

Code: Select all

11:37:11 [DEBUG   ][deluge.ui.gtk3.gtkui              :65  ] OS signal "die" caught with args: (0,)
ConsoleCtrlHandler function failedTraceback (most recent call last):
  File "C:\Program Files\Deluge\lib\site-packages\deluge\ui\gtk3\gtkui.py", line 150, in on_die
    reactor.stop()
  File "C:\Program Files\Deluge\lib\site-packages\twisted\internet\base.py", line 646, in stop
    raise error.ReactorNotRunning(
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.
I then wiped out the appdata location to allow a totally fresh run with your portable install and continue to get the same issue.
I took a debug log which is here:

https://pastebin.com/7N1rpkCt

If you take a look there is about a 2 minute hang between 13:01:09 and 13:03:35. On previous runs this delay was like 15 minutes at the exact same point. Then as you look down there are more large delays...7 minutes...then 4 until 13:14 when it says it is showing the window.
So basically it seems to just sit there, not doing or logging anything for minutes at a time.

I have no event log errors, my disks are good, don't seem to have issues with anything else so I have no idea what is going on here. The problem is this happens on my 2016 box too, although with much less frequency (I also rarely use it on that box, but when I do use the GUI client I would say maybe 25% of the time I have this issue vs 90% of the time on my laptop).

So, in short, I am recreating these issues using a clean portable install of your version on two different Windows OS systems.

What are my next steps?

thanks
bengalih
Leecher
Leecher
Posts: 56
Joined: Fri Feb 14, 2014 3:31 am

Re: Unofficial Deluge 2.0.x for Windows installer

Post by bengalih »

mhertz wrote:Yeah sadly not very helpful indeed, as you stated. Is it all torrents or just that one, since it worked fine in my two tests. Maybe also run the deluged daemon with debug-logging and see if anything on that end. Sorry can not help you with this unfortunetly.

Yes, deluge-console works in my build.
Hey...also, if you would be able to:
Could you just zip up a portable install from your system where you have configured it to run so I can just extract it on my system and then launch deluged and deluge-web and try to upload?

I mean if the install is portable then that should work...and if it doesn't we know that it isn't my configuration, but something on my systems...which still doesn't really answer, but helps narrow down.
Post Reply