deluge.client.core is undefined

General support for problems installing or using Deluge
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

deluge.client.core is undefined

Post by balusten »

I have just installed deluge 2.0.3 and deluge-web 2.0.3 on debian, and am having trouble with the web UI. It complains, in the JavaScript console, that deluge.client.core is undefined.

I've looked through the files that the deluge-web and deluge installs placed on the server, and on the files that the web UI downloads into the browser, and I didn't find anywhere that a "core" property is defined on deluge.client at all. (I'm not familiar with the JS framework used so maybe I'm missing something obvious though.)

I've replicated this issue in three browsers (Firefox, LibreWolf, and Chromium) in both normal and incognito modes, with no extensions enabled. The failure is at the same place, though the error message in Chromium is different.

AFAICT, my install should be unremarkable so I'm not sure what I could be doing wrong. Is anyone else experiencing this? Any ideas? I'm planning on seeing if I can find anything in the repos themselves but ran out of time for today.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: deluge.client.core is undefined

Post by mhertz »

Does 'deluged -v' even work? I was too lazy to get deluge 2.0.3 installed/tested in a debian VM(or find a docker image for it), so just tried reproduce(unsuccesfully) with making a venv on my distro and installing deluge 2.0.3 from pypi there-in, which worked on webui, and then I downloaded latest deluge 2.0.3 deb package, extracted it and overwrote my venv's deluge/ui/web dir, with the one in the extracted deb package and that also worked in webui(just for excluding debian packaging related bug).

I asked if deluged itself works, because sounds like you don't have that working either, and not just webUI(deluge.core undefined). There's some errors for me here because py3.11, though still works, so just in case try starting deluged and deluge-web from terminal and not from systemd or other service manager, if did, just in case it isn't continually restarted and stopped or something.

How did you install deluge specifically e.g. which apt lines etc, and distro version please.

You can enable debug-logging on both deluged and deluge-web, with appended on each '-L debug -l deluge.log'. (change logging file-name for each of-course)

Edit: You stated to have installed deluge and deluge-web on debian and getting deluge-core undefined error - deluge.core is provided with deluge.common deb package, so presumably that... Sorry to lazy to test if same error in console in that specific scenario on my debain or ubuntu test VMs.
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

Re: deluge.client.core is undefined

Post by balusten »

The deluge daemon itself is working and I can access it via deluge-console.

The deluge-core package is also installed, though it was automatic because presumably the deluge package has it as a dependency.

Both the deluge daemon and the deluge-web daemon are running. The web UI seems to load, and there are no errors in the console until I pull up the Preferences dialog. The Connection Manager shows the running daemon and pretends it will let me connect to it, but nothing happens (even an error in the console) when I instruct it to make that connection.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: deluge.client.core is undefined

Post by mhertz »

Sorry, you're right about the deluge-common part of-course.

Which debian, bookworm or bullseye, and try debug-logging as command posted before(on both deluged/deluge-web). I'll see about doing a proper test then, at some point. I would start with a fresh-profile e.g. backup old(rename), but when you say deluge-console works, then shouldn't be related presumably.

As always, much preferable to upgrade deluge e.g. from pip3 install deluge(with or without sudo), as several unresolved issues, but your call of-course.

Not a general webui issue atleast, as did my local test again described before, even now with two deluge-web debian-packages as bullseye/bookworm different versions of 2.0.3 I see, but with same successfull result in both.

Edit: Googled it little more and very old deluge forum post with same error when opening preferences and couldn't connect, and was fixed by removing old config interfering, so try rename config-dir to e.g end in '-old' with deluged/deluge-web closed and then restart deluged/deluge-web and try again. Remember config-dir usually can be in both or either of /var/lib/deluged/.config/deluge and ~/.config/deluge. There are differences between console and web UIs regarding connecting, so makes sense regardless.
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

Re: deluge.client.core is undefined

Post by balusten »

I wasn't aware that using pip to install the deluge packages was considered preferable on debian, but I'll give that a try -- thanks!
User avatar
ambipro
Moderator
Moderator
Posts: 445
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: deluge.client.core is undefined

Post by ambipro »

balusten wrote: Sun Aug 13, 2023 12:54 am I wasn't aware that using pip to install the deluge packages was considered preferable on debian, but I'll give that a try -- thanks!
Debian's repos are outdated to the latest version on stable (I believe 2.0.3/4) - pip retrieves the latest.
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

Re: deluge.client.core is undefined

Post by balusten »

Just getting started now, but installing deluge via pip isn't working for me yet. Debian seems to want all pip installs to be via virtual environments (which is my preference anyway) but even though the system's default python install sees the libtorrent python bindings, the python inside the venv doesn't... even though it is the same version. Which of course means that the deluged inside the venv won't work.

And to make it worse / more annoying, the venv's pip doesn't even seem to be able to install any of the libtorrent bindings that searching on pypi.org seems to think should be available.

I haven't yet been able to find more info on this process; If anyone has run into similar issues before or has a pointer to an existing howto, I'd greatly appreciate it!
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

Re: deluge.client.core is undefined

Post by balusten »

Oh, and just for completeness: I also tried installing via pipx, which has the same problems.
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

Re: deluge.client.core is undefined

Post by balusten »

Looks like the sys.path from the system python isn't properly copied to the venv's, and has to be added manually. Light at the end of the tunnel I think.
balusten
New User
New User
Posts: 7
Joined: Fri Aug 11, 2023 6:37 am

Re: deluge.client.core is undefined

Post by balusten »

I was unable to find a pip-based install for deluge-web, so I used the existing one from the debian package.

I did manage to get it to work. I was changing things around so much it's no longer totally clear, but at one point I saw that web.conf was owned by root, with restrictive permissions, instead of the user that deluge-web was configured to run as. I changed config file ownership to be the same user as the deluge-web process, and the problem disappeared.

However, I still don't understand why that particular change fixes the symptom I was originally reporting! (Now important only for curiosity, thankfully.)
Post Reply