Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#2807 closed bug (Fixed)

WebUI broken under setup.py install

Reported by: firefox Owned by:
Priority: major Milestone: 2.0.0
Component: Web UI Version: develop
Keywords: Cc:

Description

web ui still not showing up anything. on 1.3 is ok, on 2.0 empty screen

Attachments (1)

Schermata del 2016-04-25 14-39-01.jpg (84.2 KB) - added by firefox 8 years ago.

Download all attachments as: .zip

Change History (32)

comment:1 Changed 8 years ago by firefox

Many changes but still no WEB UI

comment:2 Changed 8 years ago by Cas

Please add more info than just not working... We are not seeing any issues however this is a development branch so things will break.

comment:3 Changed 8 years ago by firefox

Well, when i call up the web UI on any browser if just shows a blank page. when on 1.3 stable works fine but on 2.0 nothing is displayed... no clue on what to start looking tried changing ssh and port but still not showing up

comment:4 Changed 8 years ago by Cas

What errors does the browser javascript console report?

Changed 8 years ago by firefox

comment:5 Changed 8 years ago by firefox

hmm how do i see that

comment:6 Changed 8 years ago by bro

Do a google search on using developer tools in browsers. In Firefox, install Firebug, and in Chrome the developer tools is included.

comment:7 Changed 8 years ago by firefox

Ok will have a look... Is it working for you?

comment:8 Changed 8 years ago by bro

The console should show javascript errors if something is wrong. We can't reproduce any issues with current develop HEAD.

comment:9 Changed 8 years ago by firefox

ReferenceError?: Deluge is not defined

autoadd.js:12:1

ReferenceError?: Deluge is not defined

stats.js:12:1

TypeError?: sp is undefined

ext-base-debug.js:251:21

TypeError?: sp is undefined

comment:10 Changed 8 years ago by Cas

Have you tried disabling those plugins?

comment:11 Changed 8 years ago by firefox

ope

in the debug says

impossible to load /css/ext-estensions.css

comment:12 Changed 8 years ago by firefox

tried to disable all plugins but still blank page, with 1.3 master version works fine

comment:14 Changed 8 years ago by firefox

tested just now, still blank screen

comment:15 Changed 8 years ago by firefox

could it be something to do with permissions ?

comment:16 Changed 8 years ago by Cas

Without giving us more details, I have no idea.

Did you do the following:

mkdir ~/delugeDevOther
export PYTHONPATH=${HOME}/delugeDevOther
python setup.py develop --install-dir ~/delugeDevOther
~/delugeDevOther/deluge-web -c ~/delugeDevOther/test_config -d

comment:17 Changed 8 years ago by firefox

sudo python setup.py clean -a && sudo python setup.py build && sudo python setup.py install

comment:18 Changed 8 years ago by firefox

its something to do in the compile

comment:19 Changed 8 years ago by firefox

sudo python setup.py clean -a python setup.py build sudo python setup.py develop

works fine.. but have to point to develop.. if you use install insted will not show up ...

comment:20 Changed 8 years ago by firefox

ok tested a few times.

sudo python setup.py clean -a && python setup.py build && sudo python setup.py develop WORKS sudo python setup.py clean -a && python setup.py build && sudo python setup.py install NOT WOKING

comment:21 Changed 8 years ago by Cas

  • Milestone changed from needs verified to 2.0
  • Summary changed from webui not working to WebUI broken under setup.py install

comment:22 Changed 8 years ago by Cas

This should be fixed by running the minify_web_js.py script before install. You will need to install the dependency of either closure or slimit.

comment:23 Changed 8 years ago by Doadin

hey i remember i was getting a blank page a long time ago but only worked with /?dev=true. Last time i believe you mentioned it being a bug in a slimit version? If i remember right. However in either case i uninstalled slimit and installed closure and i get

Closure-20150315:

C:\Jenkins\jobs\Deluge - Develop - local Test\workspace>python minify_web_js.py deluge/ui/web/js/deluge-all 
Traceback (most recent call last):
  File "C:\Python27\Scripts\closure-script.py", line 9, in <module>
    load_entry_point('closure==20150315', 'console_scripts', 'closure')()
  File "c:\python27\lib\site-packages\closure\__init__.py", line 13, in main
    os.execlp("java", name, "-jar", get_jar_filename(), *sys.argv[1:])
  File "c:\python27\lib\os.py", line 329, in execlp
    execvp(file, args)
  File "c:\python27\lib\os.py", line 346, in execvp
    _execvpe(file, args)
  File "c:\python27\lib\os.py", line 382, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
Minified C:\Jenkins\jobs\Deluge - Develop - local Test\workspace\deluge\ui\web\js\deluge-all

Browser:
ReferenceError: Deluge is not defined

Slimit-0.8.1:

C:\Jenkins\jobs\Deluge - Develop\workspace>python minify_web_js.py deluge/ui/web/js/deluge-all 
Minified C:\Jenkins\jobs\Deluge - Develop\workspace\deluge\ui\web\js\deluge-all

Browser:
ReferenceError: Deluge is not defined

It was either slimit version or ply version i think? Id have to go back and look to find out.

Last edited 8 years ago by Doadin (previous) (diff)

comment:24 Changed 8 years ago by Cas

Ah your issue is that ExtJS needs minified too, just run the script without any args and it will default to minifying both Deluge and ExtJS js code.

There will be no difference between output of minfiers, other than marginal compactness gains. I see no issues with closure here but just keep using slimit as it looks fine.

comment:25 Changed 8 years ago by Doadin

The closure error was due to java not being installed. Closure needs java slimit doesnt? More on topic though i run it like you said and it minifies both yet i get the same browser console message

C:\Jenkins\jobs\Deluge - Develop - local Test\workspace>python minify_web_js.py 
Minified deluge/ui/web/js/deluge-all
Minified deluge/ui/web/js/extjs/ext-extensions

C:\Jenkins\jobs\Deluge - Develop - local Test\workspace>python setup.py build 
running build
running build_trans
Compiling po files from deluge/i18n/...
ar, ast, be, bg, bn, bs, ca, cs, cy, da, de, el, en_AU, en_CA, en_GB, eo, es, et, eu, fa, fi, fr, fy, gl, he, hi, hr, hu, id, is, it, iu, ja, ka, kk, kn, ko, ku, la, lt, lv, mk, ms, nb, nds, nl, pl, pms, pt, pt_BR, ro, ru, si, sk, sl, sr, sv, ta, th, tl, tlh, tr, uk, vi, zh_CN, zh_HK, zh_TW,  
Finished compiling translation files. 
running build_plugins
deluge\ui\web\js\deluge-all-debug.js:2695: ERROR - Parse error. IE8 (and below) will parse trailing commas in array and object literals incorrectly. If you are targeting newer versions of JS, set the appropriate language_in option.
            fieldLabel: _('Old:'),
                                 ^
8 error(s), 0 warning(s)

edited to remove the other 7 "errors".

Commands run:

cd "C:\Python27\Lib\site-packages"
for /f "tokens=*" %%f in ('dir .\deluge* /ad/b') do rd "%%f" /s/q
cd C:\Python27\Scripts
del deluge*
cd C:\Jenkins\jobs\Deluge - Develop - local Test\workspace\
python setup.py clean -a
python minify_web_js.py
python setup.py build
python setup.py install
C:\Users\doadin>pip freeze
altgraph==0.12
attrs==15.2.0
bbfreeze==1.1.3
bbfreeze-loader==1.1.0
cffi==1.6.0
characteristic==14.3.0
chardet==2.3.0
closure==20150315
cryptography==1.3.2
deluge==2.0.0.dev674
enum34==1.1.6
future==0.15.2
idna==2.1
Mako==1.0.4
MarkupSafe==0.23
pefile==2016.3.28
Pillow==3.2.0
pluggy==0.3.1
ply==3.8
py==1.4.31
pyasn1==0.1.9
pyasn1-modules==0.0.8
pycairo==1.8.10
pycparser==2.14
pygame==1.9.2a0
pygobject==2.28.3
pygtk==2.24.0
pyOpenSSL==16.0.0
pypiwin32==219
python-libtorrent==1.0.3
pyxdg==0.25
service-identity==16.0.0
six==1.10.0
tox==2.3.1
Twisted==16.1.1
virtualenv==15.0.1
zope.interface==4.1.3
Last edited 8 years ago by Doadin (previous) (diff)

comment:26 Changed 8 years ago by Cas

closure is a java code tool (that is detailed on pypi page) whereas slimit is a python tool.

Can you verify that the js files are in the install directory. If they are then the only missing piece is likely needing to add ?dev=False to web url as the version string contains dev

comment:27 Changed 8 years ago by Doadin

it appears deluge-all is missing? and some others? http://pastebin.com/Fgw8NQmD work dir

python dir

C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js>dir
 /s /b /o:gn
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\del
uge-all-debug.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\get
text.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js\ext-all.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js\ext-all-debug.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js\ext-base.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js\ext-base-debug.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js\ext-extensions.js
C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js\ext
js\ext-extensions-debug.js

C:\Python27\Lib\site-packages\deluge-2.0.0.dev685-py2.7.egg\deluge\ui\web\js>

also btw /?dev=true or /?dev=false make no difference.

Version 5, edited 8 years ago by Doadin (previous) (next) (diff)

comment:28 Changed 8 years ago by Doadin

the errors after manually copying are:

TypeError: Ext.ux.form is undefined
TypeError: Ext.ux.tree is undefined
TypeError: Ext.ux.tree is undefined
TypeError: sp is undefined
TypeError: Ext.ux.grid is undefined
TypeError: Deluge.add.AddWindow is not a constructor

looking up TypeError?: Ext.ux.form is undefined i find refference to it saying

The Ext.ux.form.SearchField? is a user extension and is not included in the extjs library out of the box. You need to include the file with this class in your page.

in the sencha beta api i find "Ext.ux.form.FileUploadField?" but not in current stable, dont know if thats related or not.

Last edited 8 years ago by Doadin (previous) (diff)

comment:30 Changed 8 years ago by Cas

  • Resolution set to Fixed
  • Status changed from new to closed

@Doadin There is no need to do anything with extjs, those last set of errors are irrelevant and is instead something to do your copying of files.

The deluge-all.js file is either there or it is not. If you are missing that file then there must have been an error with the minify script and that is what needs looked at.

There were errors from using closure which do prevent minifying but I already fixed those [bd7d10b81e5e28f]. slimit would have worked regardless of errors so I suggest switch to using slimit.

A set of changes have now been a applied to develop that covers all of these issues: [cea50f319d], [6ce9f77e17], [0f43b564c99]

comment:31 Changed 6 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.