idlesign / deluge-webapi

Plugin for Deluge WebUI providing sane JSON API
https://github.com/idlesign/deluge-webapi
BSD 3-Clause "New" or "Revised" License
120 stars 27 forks source link

Can't enable plugin in version 1.3.12 #6

Closed timsassen closed 5 years ago

timsassen commented 7 years ago

Hi, I recently upgraded from Ubuntu 14.04 to 16.04. After upgrading the webapi plugin was disabled. I tried enabling the egg in the preference window (webui). But when I reopen the preference window the plugin is disabled again. I renamed the egg before installing. Why won't it enable?

Ubuntu 16.04 Python version 2.7

idlesign commented 7 years ago

Hi,

I'm not using Deluge currently and have no test env to debug it. May be they've changed plugin format, may be not. You can try to run Deluge daemon in debug mode and see its log.

seanvree commented 6 years ago

I get the same problem:

Dec 14 07:39:19 DelugeVSB deluge.log: [ERROR   ] 07:39:17 pluginmanagerbase:147 Component already registered with name CorePlugin.deluge_webapi
Dec 14 07:39:19 DelugeVSB deluge.log: Traceback (most recent call last):
Dec 14 07:39:19 DelugeVSB deluge.log:   File "deluge\pluginmanagerbase.py", line 144, in enable_plugin
Dec 14 07:39:19 DelugeVSB deluge.log:   File "c:\deluge\plugins\deluge_webapi-0.2.0-py2.7.egg\webapi\__init__.py", line 12, in __init__
Dec 14 07:39:19 DelugeVSB deluge.log:     super(CorePlugin, self).__init__(plugin_name)
Dec 14 07:39:19 DelugeVSB deluge.log:   File "deluge\plugins\init.py", line 44, in __init__
Dec 14 07:39:19 DelugeVSB deluge.log:   File "deluge\plugins\pluginbase.py", line 54, in __init__
Dec 14 07:39:19 DelugeVSB deluge.log:   File "deluge\plugins\pluginbase.py", line 44, in __init__
Dec 14 07:39:19 DelugeVSB deluge.log:   File "deluge\component.py", line 97, in __init__
Dec 14 07:39:19 DelugeVSB deluge.log:   File "deluge\component.py", line 241, in register
Dec 14 07:39:19 DelugeVSB deluge.log: ComponentAlreadyRegistered: Component already registered with name CorePlugin.deluge_webapi
Dec 14 07:39:19 DelugeVSB deluge.log: [ERROR   ] 07:39:17 pluginmanagerbase:146 Unable to instantiate plugin!
idlesign commented 6 years ago

@seanvree

  1. Is it from Web UI activation?
  2. What Deluge version is it?
  3. Is it a fresh install or an upgrade from previous version of plugin?
seanvree commented 6 years ago

@idlesign

  1. Yes, From the WebUI
  2. 1.3.15 (Python 2.7.14)
  3. Fresh install
idlesign commented 6 years ago

I'll try to see into it in a couple of days.

seanvree commented 6 years ago

@idlesign no rush.

Question - does this "add" to the already-in-place webUI APi functionality, or overwrite it?

idlesign commented 6 years ago

Adds.

seanvree commented 6 years ago

Coo, thanks.

idlesign commented 6 years ago

I was unable to reproduce it on Deluge 1.3.15, Python 2.7.14, Ubuntu 17.10. It installs and enables well and checkbox is active on Prefences window reopen. My guess would be that it might be somehow related to Windows.

dejected1 commented 6 years ago

i have the same issue. Windows 10 pro x64. deluge 1.3.15 python 2.7.14. I installed the egg and i try to enable it but it disables itself right after i click ok. I tried from the webui and the dameon, no change.

idlesign commented 5 years ago

Please consider using a more recent Deluge version alongside with recent plugin egg from https://github.com/idlesign/deluge-webapi/tree/master/dist (not for PyPI). Considered closed. Feel free to reopen if required.

CardcaptorRLH85 commented 3 years ago

I'm using Deluge v. 2.0.3-2-201906121747 on ubuntu18.04.1 along with version 0.4.0 of this plugin and I'm having this same issue. I don't think I've seen any more recent stable builds of Deluge but, if one exists, I'm willing to try using it to fix this problem if someone can point me in the right direction.

idlesign commented 3 years ago

@CardcaptorRLH85 Unfortunately Deluge plugins activation seems to be highly dependent upon plugin installation method and environment (see #27). Without logs it's almost impossible to trace it.

CardcaptorRLH85 commented 3 years ago

@CardcaptorRLH85 Unfortunately Deluge plugins activation seems to be highly dependent upon plugin installation method and environment (see #27). Without logs it's almost impossible to trace it.

Thanks for the reply. I've pretty much given up on enabling this plugin through the GUI but, here's the output I get on the command line.

root@952c62412660:~/tmp# deluge-console -U localclient -P [REDACTED] -L debug plugin --install WebAPI-0.4.0-py3.6.egg --enable WebAPI
14:57:45 [INFO    ][deluge.ui.ui:70  ] Deluge ui 2.0.3-2-201906121747-ubuntu18.04.1
14:57:45 [DEBUG   ][deluge.ui.ui:71  ] options: Namespace(command='plugin', config=None, daemon_addr='127.0.0.1', daemon_pass='[REDACTED]', daemon_port=58846, daemon_user='localclient', disable=None, enable=['WebAPI'], install='WebAPI-0.4.0-py3.6.egg', list=False, logfile=None, loglevel='debug', logrotate=None, parsed_cmds=[Namespace(command='plugin', config=None, daemon_addr='127.0.0.1', daemon_pass='[REDACTED]', daemon_port=58846, daemon_user='localclient', disable=None, enable=['WebAPI'], install='WebAPI-0.4.0-py3.6.egg', list=False, logfile=None, loglevel='debug', logrotate=None, parsed_cmds=[...], profile=False, quiet=False, reload=False, remaining=[], show=False)], profile=False, quiet=False, reload=False, remaining=[], show=False)
14:57:45 [INFO    ][deluge.ui.ui:72  ] Starting console ui..
14:57:48 [INFO    ][deluge.i18n.util                                      :102 ] Setting up translations from /usr/lib/python3/dist-packages/deluge/i18n
14:57:48 [DEBUG   ][deluge.ui.console.main                                :91  ] Using encoding: utf-8
14:57:48 [DEBUG   ][deluge.ui.sessionproxy                                :33  ] SessionProxy init..
14:57:48 [DEBUG   ][deluge.ui.coreconfig                                  :22  ] CoreConfig init..
14:57:48 [INFO    ][deluge.ui.console.main                                :226 ] connect: host=127.0.0.1, port=58846, username=localclient, password=[REDACTED]
14:57:48 [DEBUG   ][deluge.ui.client                                      :286 ] sslproxy.connect()
14:57:48 [DEBUG   ][deluge.ui.client                                      :212 ] Connecting to daemon at "127.0.0.1:58846"...
14:57:48 [DEBUG   ][deluge.ui.client                                      :93  ] Connected to daemon at 127.0.0.1:58846..
14:57:48 [DEBUG   ][deluge.ui.client                                      :392 ] __on_connect called
14:57:48 [DEBUG   ][deluge.ui.client                                      :396 ] Got info from daemon: 2.0.3-2-201906121747-ubuntu18.04.1
14:57:48 [DEBUG   ][deluge.ui.client                                      :592 ] on_connected. Daemon version: 2.0.3-2-201906121747-ubuntu18.04.1
14:57:48 [DEBUG   ][deluge.ui.client                                      :411 ] DaemonSSLProxy.authenticate: localclient
14:57:48 [DEBUG   ][deluge.ui.client                                      :423 ] __on_login called: localclient 10
14:57:48 [DEBUG   ][deluge.ui.client                                      :601 ] Authentication successful: 10
14:57:48 [DEBUG   ][deluge.ui.client                                      :302 ] sslproxy.disconnect()
14:57:48 [DEBUG   ][deluge.ui.client                                      :228 ] Connection lost to daemon at "127.0.0.1:58846" reason: connection was closed cleanly.
14:57:48 [INFO    ][twisted                                               :154 ] Main loop terminated.
14:57:48 [DEBUG   ][deluge.component                                      :300 ] Deregistering Component: SessionProxy
14:57:48 [DEBUG   ][deluge.component                                      :300 ] Deregistering Component: CoreConfig
14:57:48 [DEBUG   ][deluge.component                                      :300 ] Deregistering Component: ConsoleUI
root@952c62412660:~/tmp#

And this is all that appears in deluged.log

14:57:48 [INFO    ][deluge.core.rpcserver         :171 ] Deluge Client connection made from: 127.0.0.1:57444
14:57:48 [INFO    ][deluge.core.rpcserver         :197 ] Deluge client disconnected: Connection to the other side was lost in a non clean fashion: Connection lost.

Reading these logs it appears like the client thinks that its disconnecting cleanly but the server doesn't. Beyond that, I have no clue.

EDIT: I have absolutely no idea what I did to fix this, but it's working now so I'm going to stop touching it. All I've done since the above was restart my container and just for grins try adding the .egg through the UI again. It just worked this time.