key-networks / ztncui

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

TypeError: /snapshot/src/views/controller_layout.pug:21 #20

Closed Zeitkind closed 5 years ago

Zeitkind commented 5 years ago

Fresh installation on an Ubuntu 18.04 VM. Can log in, can create a new user, can make a new network, can join this network. But several settings are inaccessible due to errors. When I click on network/detail I get:

TypeError: /snapshot/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 (/snapshot/src/node_modules/pug-runtime/wrap.js:6:10), :53:73) at template (eval at wrap (/snapshot/src/node_modules/pug-runtime/wrap.js:6:10), :104:225) at Object.exports.renderFile (/snapshot/src/node_modules/pug/lib/index.js:427:38) at Object.exports.renderFile (/snapshot/src/node_modules/pug/lib/index.js:417:21) at View.exports.__express [as engine] (/snapshot/src/node_modules/pug/lib/index.js:464:11) at View.render (/snapshot/src/node_modules/express/lib/view.js:135:8) at tryRender (/snapshot/src/node_modules/express/lib/application.js:640:10) at Function.render (/snapshot/src/node_modules/express/lib/application.js:592:3) at ServerResponse.render (/snapshot/src/node_modules/express/lib/response.js:1008:7) at /snapshot/src/app.js:0:0

Same when I'm on eg. https://myservername:3443/controller/network/thenetworknumber/name on the klick back to the ../networknumber

TypeError: /snapshot/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 (/snapshot/src/node_modules/pug-runtime/wrap.js:6:10), :53:73) at template (eval at wrap (/snapshot/src/node_modules/pug-runtime/wrap.js:6:10), :104:225) at Object.exports.renderFile (/snapshot/src/node_modules/pug/lib/index.js:427:38) at Object.exports.renderFile (/snapshot/src/node_modules/pug/lib/index.js:417:21) at View.exports.__express [as engine] (/snapshot/src/node_modules/pug/lib/index.js:464:11) at View.render (/snapshot/src/node_modules/express/lib/view.js:135:8) at tryRender (/snapshot/src/node_modules/express/lib/application.js:640:10) at Function.render (/snapshot/src/node_modules/express/lib/application.js:592:3) at ServerResponse.render (/snapshot/src/node_modules/express/lib/response.js:1008:7) at /snapshot/src/app.js:0:0

Any ideas?

key-networks commented 5 years ago

Could you please report the versions of ztncui and zerotier-one that you are using?

Have you had a look at these issues? Perhaps they may help: https://github.com/key-networks/ztncui/issues/17 https://github.com/key-networks/ztncui/issues/7

Zeitkind commented 5 years ago

ztncui_0.5.6_amd64.deb as suggested at https://key-networks.com/ztncui/#source installation instructions. Issue #17 looks like the same problem that I have. And I'm also not using docker or proxies. It's a quite fresh Ubuntu 18.04 server VM (running on Proxmox) with jitsi and zerotier installed.

key-networks commented 5 years ago

What version of zerotier-one are you using?

Zeitkind commented 5 years ago

zerotier-cli -v 1.4.2

Fastidious commented 5 years ago

For what is worth, I am running the same ZeroTier version, and the latest .deb ztncui's. I am not experiencing this problem, but it isn't a fresh installation.

key-networks commented 5 years ago

I've confirmed the same problem on fresh instances of Ubuntu 18.04, Debian 10 and Centos 7. Very odd, since the Docker image is built on Centos 7 and that works fine.

key-networks commented 5 years ago

We have cross-reporting of this issue here https://github.com/key-networks/ztncui-containerized/issues/9

Zeitkind commented 5 years ago

My setting is for testing only atm, so I will wait and see.. ^^ Using zerotier with some OpenVPN mixed for a while now, best VPN for my needs, now evaluating for commercial & school use. I dislike docker and this newish VM-but-not-VM stuff, so I'd really like to see a prebuild KVM-VM for testing the zerotier controller.

key-networks commented 5 years ago

The problem was not checking whether or not the element of an array was defined when listing network details. I've uploaded new packages for version 0.5.8 - please test them and give me your feedback.

Zeitkind commented 5 years ago

Yeah, seems to work now. I can now edit network settings and all other errors are also gone. Thx!