Deluge-web 2.0.3 does not remember enabled columns

General support for problems installing or using Deluge
graysky
Leecher
Leecher
Posts: 54
Joined: Sun Oct 05, 2008 11:28 am

Deluge-web 2.0.3 does not remember enabled columns

Post by graysky »

My deluge web does not remember the columns I enabled in the webgui between sessions. For example, I add "seeds" and I remove "owner" from the webGUI. When I exit my browser and then return, the "seeds" column is missing and the "owners" column has returned. Is this a known bug?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by mhertz »

I was about to reproduce this and then go fill a bug-ticket for it and post ticket-link here, but unfortunetly I was unable to reproduce this on latest arch-linux as yourself. Strange... I have a completely fresh profile which I tested it with, and I used deluge and qutebrowser from the repo's to access the webUI.

Hmm, I just tried also deleting deluge's profile dir and starting deluged/deluge-web/qutebrowser again and the columns where still as defined by me previously, as in your example with 'owner' and 'seed'. I also figured this, because beforehand I tried grep'ing for some of the column-names in that dir, without finding a config-file with that stored in(except for console.conf, but that was obviously for the consoleUI, and didn't match my settings made for the test with regards to which columns to hide or show), so I believe this then means that it is saved by your browser, and some then seem to reset this and others doesn't, like mine.

Btw, thanks for many years of packaging duties, much appreciated mate! :)
graysky
Leecher
Leecher
Posts: 54
Joined: Sun Oct 05, 2008 11:28 am

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by graysky »

I tried using qutebrowser as well. If I modify my deluge-web columns and logout, then log back in they are retained, but if I quit the browser and come back to it they are not retained.

More details for me:
* I am running the systemd services for both deluged and deluge-web on another machine on my LAN.
* The config files on Arch are located in /srv/deluge/.config/deluge/ and I am seeing the date/time stamp on web.conf change to reflect the time I logged into the webclient. When I edit that file, I see no references to the columns I selected. Is that expected? Perhaps deluge-web settings are saved as cookies within a browser?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by mhertz »

I think you're correct in your sentiment about: "Perhaps deluge-web settings are saved as cookies within a browser?". I also was wondering why web.conf didn't save any of this, and as said, I deleted the whole profile-dir for one test where all columns modified persisted afterwards. I always quited the browser and deluge* in between in my tests.

The only thing i'm wondering about now, is why we have different results on this with using same browser, and if this only started happening in deluge v2.

I don't use such a setup as you do, so could you quickly do a test and see if you have same results as me, by running deluged and deluge-web in your regular user account, and connect it from qutebrowser, and change columns, then close browser and 'pkill deluge*' and start everything up again and see if persistent. Since you use systemd to start deluged normally then it's usually run under deluge user, so running this test under regular user makes a clean deluge profile which you can delete afterwards under ~/.config if not using anymore.

Lastly, you're not enabling qutebrowser to ditch cookies at shutdown from config.py, right? I have all cookie-handling settings as per default on my end.
graysky
Leecher
Leecher
Posts: 54
Joined: Sun Oct 05, 2008 11:28 am

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by graysky »

For security reasons, I highly recommend you do not run deluge as your user but as the unprivileged 'deluge' user which is created when you install the Arch package and do so via the systemd services.

Code: Select all

 grep deluge /etc/passwd
deluge:x:125:125:Deluge BitTorrent daemon:/srv/deluge:/sbin/nologin
I did not modify qutebrowser's defaults for my testing.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by mhertz »

Thanks for the security recommendation, I only use deluge locally without having remote connections allowed, also locked to namespace only accepting tun0 and lo, but I hear ya', sound advice for sure :)

Anyway, I tested for you by running through systemd, though still locally, and get same result as I described previously, so i'm affraid im out of ideas and hopefully others can possibly think of something.

Good luck! :)
graysky
Leecher
Leecher
Posts: 54
Joined: Sun Oct 05, 2008 11:28 am

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by graysky »

Thanks for your help. I switched to this setup: linux container running deluged.service and deluge-web.service. Similar to a remote host. I get the same result even if I launch a browser from that container and browse to localhost:8112 therein.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by mhertz »

Strange indeed... I forgot I had chromium installed as backup-browser(don't really need it as qutebrowser uses same backend), and of-course I could just have installed it, or other one, for testing and uninstalled again. Anyway, I ran 'sudo systemctl start deluged deluge-web' and ran chromium afterwards and it had reset and default columns, opposite of previous qutebrowser runs, meaning it surely must be saved as browser-cookies as you stated previously - Changing some columns and closing chromium, deluged and deluge-web, and then firering everything up again, showed correctly the modified columns correctly now.

Hopefully others can chime in with ideas/solution :)
graysky
Leecher
Leecher
Posts: 54
Joined: Sun Oct 05, 2008 11:28 am

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by graysky »

Thanks for confirming. It must be something unique to my systems but I am at a loss as to what that could be.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge-web 2.0.3 does not remember enabled columns

Post by mhertz »

Sorry, not much to add, but unless somethings changed, then I found in an old thread that deluge sets column-data in a browser cookie named ys-torrentgrid. This was very old info from 2011, and then in November 2015 Cas made a change to make the cookie last longer in lifespan, so it might still be how things work. Maybe see if you have that cookie and maybe also try running deluge-web and maybe deluged also, in debug logging mode, to see if anything sticks out.

Finally, in that thread there where suggestions to how hardcode which columns to show always in the JS code, but that should be last resort I guess, and I don't know if the code has changed in those suggestions either.

viewtopic.php?t=36083

Edit: I can see the cookie being set/defined/used correctly on my end, by in chromium logging into webui and opening developer-tools with 'ctrl-shift-i' and there select 'Application' at top right and then selecting 'Cookies' and 'http://localhost:8112', and there are tree values listed, 'SID', '_session_id' and 'ys-torrentGrid', and that last cookie-element when resting mouse over 'Value' there comes a long value where I can see column code-names listed with some having hidden and others not. You probably are missing this, and unfortunetly I still have no solution for that, other than checking the before-named debug-logs and ultimately editing source-code directly as last resort.

Edit2: Lastly, I found a 3 year old unanswered feature-request bug-ticket about sometimes the ys-torrentGrid cookie failing to be set with a 404 bad request error, because it was to big, and for nginx users a nginx setting was suggested to fix this. Still, unless using nginx, I guess not very helpful, but this might be the issue you're having/culprit.
https://dev.deluge-torrent.org/ticket/2894
Post Reply