Deluge displays blank screen.

General support for problems installing or using Deluge
Simmy
New User
New User
Posts: 2
Joined: Tue Dec 14, 2021 8:10 am

Deluge displays blank screen.

Post by Simmy »

Hello,
I've had deluge installed inside a docker container on Debian 10 for some time.
Two days ago I lost access to the WebUI (Being greeted with a completely blank white page, not even settings), I tried reinstalling and everything in between. Even a fresh install on another server, with again the same issue.
I have since realised that deluge was updated at the same time.

Am I missing something obvious?
Is this something easily solved?

Regards.

Log Copy
09:24:58 [INFO ][deluge.configmanager:52 ] Setting config directory to: /config
09:25:05 [INFO ][deluge.core.daemon :94 ] Deluge daemon 2.0.4-0-202112121857-ubuntu18.04.1
09:25:06 [INFO ][deluge.core.core :339 ] Successfully loaded session.state: /config/session.state
09:25:06 [WARNING ][deluge.core.core :337 ] Unable to load /config/session.state.bak: [Errno 2] No such file or directory: '/config/session.state.bak'
09:25:06 [INFO ][deluge.core.alertmanager :148 ] Alert Queue Size set to 10000
09:25:07 [INFO ][deluge.core.rpcserver :402 ] Starting DelugeRPC server localhost:58846
09:25:08 [INFO ][twisted :154 ] Factory (TLS) starting on 58846
09:25:08 [INFO ][twisted :154 ] Starting factory <twisted.internet.protocol.Factory object at 0x7f7e8e2b9358>
09:25:08 [INFO ][deluge.core.daemon :154 ] Deluge daemon starting...
09:25:08 [INFO ][deluge.core.authmanager :228 ] Opening auth for load: /config/auth
09:25:08 [INFO ][deluge.core.authmanager :236 ] Successfully loaded auth: /config/auth
09:25:08 [INFO ][deluge.core.torrentmanager :1630] on_alert_external_ip: x.x.x.x
09:25:08 [INFO ][deluge.core.torrentmanager :818 ] Loading torrent state: /config/state/torrents.state
09:25:08 [INFO ][deluge.core.torrentmanager :834 ] Successfully loaded /config/state/torrents.state
09:25:08 [INFO ][deluge.core.torrentmanager :1081] Opening torrents.fastresume for load: /config/state/torrents.fastresume
09:25:08 [INFO ][deluge.core.torrentmanager :1081] Opening torrents.fastresume for load: /config/state/torrents.fastresume.bak
09:25:08 [INFO ][deluge.core.torrentmanager :1081] Opening torrents.fastresume for load: /config/torrents.fastresume
09:25:08 [INFO ][deluge.core.torrentmanager :900 ] Finished loading 0 torrents in 0:00:00.047854
tichotgm
New User
New User
Posts: 3
Joined: Tue Dec 14, 2021 10:29 am

Re: Deluge displays blank screen.

Post by tichotgm »

Hi.

In your case, this https://github.com/linuxserver/docker-deluge/issues/127 might help.

I don't use docker, but my deluge install on Ubuntu 18.04 has been behaving the same since it updated yesterday to 2.0.4.
I've checked everything I could think of, configs-wise, but nothing made a difference.
I'm still trying to figure out a way to revert to 2.0.3 (not hugely at ease with linux), so all I can say is other people on docker in that ticket seem to have had success by reverting.
I will add, from what I have tried so far on my install, the problem presents pretty much exactly as on that docker ticket.
The only difference is I have a few plugins active and the errors on the browser console would be related to them, at first. But I can connect to the daemon on a 2.0.3 thin-client in another (windows) machine and everything seems to be running as it should, apart from deluge-web. So I disabled the plugins, reloaded deluge-web and then I got the exact same error as in the second screenshot of that ticket: an error on the line that reads "Deluge.debug = false;".
The backend, as it were, for deluge-web seems to be working, because the extension I use to send torrent/magnet links works and adds them successfully. So, as far as I can tell/have tested, it's doing all it should, except displaying the webpage as usual.
The only thing I haven't tried is switch python versions. I'm running 3.7.5, but I believe 3.8 is also installed. I'd rather not have to change defaults because other programs could break.

Can anyone confirm whether this could be setup dependent, or an actual bug with deluge-web?

In any case, thanks in advance.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge displays blank screen.

Post by Cas »

Hmm it must be a bug in WebUI, I shall have to look into it. Are there any error in the browser console?
ftpgetter
New User
New User
Posts: 1
Joined: Tue Dec 14, 2021 2:01 pm

Re: Deluge displays blank screen.

Post by ftpgetter »

In my case after update to 2.0.4 file deluge-all.js was 0 size. Chrome devtool show error in line 42 of index (Deluge.debug = false;)

I just copy content of deluge-all-debug.js into deluge-all.js and UI show again.
tichotgm
New User
New User
Posts: 3
Joined: Tue Dec 14, 2021 10:29 am

Re: Deluge displays blank screen.

Post by tichotgm »

Thanks for the reply.

My page source, with the plugins active, is this:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Deluge WebUI 2.0.4-0-202112121857-ubuntu18.04.1</title>

        <link rel="icon" sizes="16x16" type="image/png"
            href="/deluge/icons/deluge.png"/>
        <link rel="icon" sizes="32x32" type="image/png"
            href="/deluge/icons/deluge-32.png"/>
        <!-- For Chrome, Android, iOS and Windows touch shortcuts: -->
        <link rel="icon" sizes="192x192" type="image/png"
            href="/deluge/icons/deluge-192.png"/>
        <link rel="icon" sizes="512x512" type="image/png"
            href="/deluge/icons/deluge-512.png"/>
        <link rel="apple-touch-icon-precomposed"
            href="/deluge/icons/deluge-apple-180.png"/>
        <meta name="msapplication-TileColor" content="#599eee">
        <meta name="theme-color" content="#599eee">

        <!-- Stylesheets -->
        <link rel="stylesheet" type="text/css" href="/deluge/css/ext-all-notheme.css"/>
        <link rel="stylesheet" type="text/css" href="/deluge/themes/css/xtheme-gray.css"/>
        <link rel="stylesheet" type="text/css" href="/deluge/css/ext-extensions.css"/>
        <link rel="stylesheet" type="text/css" href="/deluge/css/deluge.css"/>

        <script type="text/javascript">
        deluge = {
            author: 'Deluge Team',
            version: '2.0.4-0-202112121857-ubuntu18.04.1',
            config: {"theme": "gray", "sidebar_show_zero": false, "sidebar_multiple_filters": true, "show_session_speed": true, "base": "/deluge/", "first_login": false}
        }
        </script>

        <!-- Javascript -->
        <script type="text/javascript" src="/deluge/gettext.js"></script>
        <script type="text/javascript" src="/deluge/js/ext-base.js"></script>
        <script type="text/javascript" src="/deluge/js/ext-all.js"></script>
        <script type="text/javascript" src="/deluge/js/ext-extensions.js"></script>
        <script type="text/javascript" src="/deluge/js/deluge-all.js"></script>
        <script type="text/javascript" src="/deluge/js/execute/execute.js"></script>
        <script type="text/javascript" src="/deluge/js/label/label.js"></script>
        <script type="text/javascript" src="/deluge/js/labelplus/labelplus.js"></script>
        <script type="text/javascript" src="/deluge/js/scheduler/scheduler.js"></script>
        <script type="text/javascript">
            Deluge.debug = false;
        </script>
    </head>
    <body>
        <div style="background-image: url('/deluge/themes/images/default/tree/loading.gif');"></div>

        <!-- Preload icon classes -->
        <div class="ext-mb-error"></div>
        <div class="icon-ok"></div>
    </body>
</html>
I have deluge going through a reverse proxy in apache, and the "base" is probably correctly being passed to deluge, because I have it set as "/" on web.conf, but it is correct in the page config section, here. If I try the address as ip:port, the same blank page shows up and "base" is indeed "/" since it's not going through apache. I mention it only because it was one of the first things I thought of and tested.

As for the errors with the page here is the output:

Code: Select all

Uncaught TypeError: P is undefined
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/execute/execute.js:287
ext-base.js:21:2381
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/execute/execute.js:287
Uncaught TypeError: P is undefined
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/label/label.js:433
ext-base.js:21:2381
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/label/label.js:433
Uncaught TypeError: P is undefined
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/labelplus/labelplus.js:76
ext-base.js:21:2381
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/labelplus/labelplus.js:76
Uncaught TypeError: P is undefined
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/scheduler/scheduler.js:608
ext-base.js:21:2381
    extend https://[MY_URL]/deluge/js/ext-base.js:21
    <anonymous> https://[MY_URL]/deluge/js/scheduler/scheduler.js:608
I don't know if it's too readable as pasted, but essentially each plugin seems to fail at the line starting with "Deluge.plugins.ExecutePlugin =", whereas ext-base.js shows up as a long line of code, with the error highlighting a section that reads "N=P.prototype;".
In fact, I just noticed I get the same error as the first screenshot in the docker example with label.js line 433, so there's probably some commonality there.

If I disable the plugins, like I mentioned before, all I get is an error at the line "Deluge.debug = false;" of the page source, like in the second screenshot of the docker example. Just tried it and it's the same "Deluge is not defined" error at the same location as in the screenshot, line 41.

If there's something you want me to try, I'll gladly do it, if my skills are up to the task ;)
Last edited by tichotgm on Tue May 10, 2022 10:07 am, edited 1 time in total.
tichotgm
New User
New User
Posts: 3
Joined: Tue Dec 14, 2021 10:29 am

Re: Deluge displays blank screen.

Post by tichotgm »

ftpgetter wrote: Tue Dec 14, 2021 2:06 pm In my case after update to 2.0.4 file deluge-all.js was 0 size. Chrome devtool show error in line 42 of index (Deluge.debug = false;)

I just copy content of deluge-all-debug.js into deluge-all.js and UI show again.
:o
Indeed that worked! Thank you!
Strange mishap, but yeah, both files existed with same creation time, but deluge-all.js was size 0.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge displays blank screen.

Post by Cas »

I can confirm it's a problem with the packaging of 2.0.4 where it seems to have been a error with minifying the javascript files.

You should be able to check by appending debug option to url:

Code: Select all

localhost:8112?debug=1
jsw10471
New User
New User
Posts: 9
Joined: Sun May 03, 2020 1:32 pm

Re: Deluge displays blank screen.

Post by jsw10471 »

So I can confirm this issue with the recent version in Docker Container as well.

You can use the following command to access your container and make the change within it:
docker exec -i -t <container-name> /bin/bash

Then run this command from within the container:
cp /usr/lib/python3/dist-packages/deluge/ui/web/js/deluge-all-debug.js /usr/lib/python3/dist-packages/deluge/ui/web/js/deluge-all.js
AzureRaptor
New User
New User
Posts: 1
Joined: Wed Dec 15, 2021 12:55 pm

Re: Deluge displays blank screen.

Post by AzureRaptor »

I'm not using docker, but just an ordinary install on Ubuntu 18.04 that's been working great for years (thanks @Cas and team!)

But the above cp command fixed things for me too. Thanks @jsw10471 for the troubleshooting!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge displays blank screen.

Post by Cas »

Thanks AzureRaptor, I looked into how the Docker deluge was installed and it uses the Ubuntu PPA which in the build process minifies the js files with closure-compiler resulting in an error and zero-length deluge-all.js.

Now I fully understand the issue I have fixed it and have a release pending...

Edit: 2.0.5 released
Post Reply