key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.56k stars 230 forks source link

TypeError displaying Network details #17

Closed mcondarelli closed 5 years ago

mcondarelli commented 5 years ago

Hi, trying to access network details (e.g.: https://zt1:3001/controller/network/7122698ebdeb0534) I consistently get the following error:

TypeError: /home/mcon/Projects/ztncui/src/views/controller_layout.pug:21
    19|       .collapse.navbar-collapse(id='BarNav')
    20|         ul.nav.navbar-nav
  > 21|           li(class=(nav.active === 'controller_home'? 'active' : ''))
    22|             a(href='/controller') Home
    23|           li(class=(nav.active === 'users'? 'active' : ''))
    24|             a(href='/users') Users

Cannot read property 'active' of undefined
    at eval (eval at wrap (/home/mcon/Projects/ztncui/src/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:53:73)
    at template (eval at wrap (/home/mcon/Projects/ztncui/src/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:104:225)
    at Object.exports.renderFile (/home/mcon/Projects/ztncui/src/node_modules/pug/lib/index.js:427:38)
    at Object.exports.renderFile (/home/mcon/Projects/ztncui/src/node_modules/pug/lib/index.js:417:21)
    at View.exports.__express [as engine] (/home/mcon/Projects/ztncui/src/node_modules/pug/lib/index.js:464:11)
    at View.render (/home/mcon/Projects/ztncui/src/node_modules/express/lib/view.js:135:8)
    at tryRender (/home/mcon/Projects/ztncui/src/node_modules/express/lib/application.js:640:10)
    at Function.render (/home/mcon/Projects/ztncui/src/node_modules/express/lib/application.js:592:3)
    at ServerResponse.render (/home/mcon/Projects/ztncui/src/node_modules/express/lib/response.js:1008:7)
    at /home/mcon/Projects/ztncui/src/app.js:73:7

my javascript proficiency is way too low to attempt fixing, but I'm available for further testing, if directed.

If it matters: I am testing on a headless VirtualBox machine (Linux zt1 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux) with self-signed certificates (for testing) and accessing it over local LAN (actually from VBox host) with https://.

TiA!

key-networks commented 5 years ago

Hi, it looks much like this issue... have you followed this ticket? https://github.com/key-networks/ztncui/issues/7

mcondarelli commented 5 years ago

Hi, I had seen that, but:

Cannot read property 'active' of undefined at eval (eval at wrap (/home/mcon/Projects/ztncui/src/node_modules/pug-runtime/wrap.js:6:10), :53:73) at template (eval at wrap (/home/mcon/Projects/ztncui/src/node_modules/pug-runtime/wrap.js:6:10), :104:225) at Object.exports.renderFile (/home/mcon/Projects/ztncui/src/node_modules/pug/lib/index.js:427:38) at Object.exports.renderFile (/home/mcon/Projects/ztncui/src/node_modules/pug/lib/index.js:417:21) at View.exports.__express [as engine] (/home/mcon/Projects/ztncui/src/node_modules/pug/lib/index.js:464:11) at View.render (/home/mcon/Projects/ztncui/src/node_modules/express/lib/view.js:135:8) at tryRender (/home/mcon/Projects/ztncui/src/node_modules/express/lib/application.js:640:10) at Function.render (/home/mcon/Projects/ztncui/src/node_modules/express/lib/application.js:592:3) at ServerResponse.render (/home/mcon/Projects/ztncui/src/node_modules/express/lib/response.js:1008:7) at /home/mcon/Projects/ztncui/src/app.js:73:7 GET /controller/network/7122698ebd435c70 500 78.539 ms - 2019


- I also installed `elinks` locally on VM running ztncui and accessed it locally, with identical results.
- Of course ZT1 controller won't answer to external address, but locally it seems to work OK.

Are You suggesting I install from .deb?
I did not see any really useful advice in #7 
I am available to perform any needed test.

Many Thanks in Advance
key-networks commented 5 years ago

Try Zerotier-one 1.2.12 installed as per https://zerotier.com/download.shtml and ztncui installed as per https://key-networks.com/ztncui/#installation