janoside / lndash

Admin UI for LND
https://lnd-admin.btc21.org
MIT License
76 stars 24 forks source link

Cannot read property 'node' of undefined #26

Closed Espen11 closed 5 years ago

Espen11 commented 5 years ago

Version 10.6 Worked fine with local LND, but added another remote LND node and get this: It worked for a second and said "Unknown", but I think the failure happened when I clicked "Activate".

TypeError: /home/espen/lnd-admin/views/layout4.pug:93 91| if (fullNetworkDescription) 92| - var addrs = [];

93| each address in fullNetworkDescription.nodeInfoByPubkey[node_pubkey].node.addresses 94| - addrs.push(address.addr); 95| 96| a.dropdown-item.rounded-0.px-3.py-2(href=('/connect-lnd?index=' + lndNodeIndex), onclick="$('#switchLndModal').modal()")

Cannot read property 'node' of undefined at eval (eval at wrap (/home/espen/lnd-admin/node_modules/pug-runtime/wrap.js:6:10), :190:68) at eval (eval at wrap (/home/espen/lnd-admin/node_modules/pug-runtime/wrap.js:6:10), :206:4) at eval (eval at wrap (/home/espen/lnd-admin/node_modules/pug-runtime/wrap.js:6:10), :897:4) at template (eval at wrap (/home/espen/lnd-admin/node_modules/pug-runtime/wrap.js:6:10), :1931:50) at Object.exports.renderFile (/home/espen/lnd-admin/node_modules/pug/lib/index.js:427:38) at Object.exports.renderFile (/home/espen/lnd-admin/node_modules/pug/lib/index.js:417:21) at exports.__express (/home/espen/lnd-admin/node_modules/pug/lib/index.js:464:11) at View.app.engine (/home/espen/lnd-admin/app.js:56:23) at View.render (/home/espen/lnd-admin/node_modules/express/lib/view.js:135:8) at tryRender (/home/espen/lnd-admin/node_modules/express/lib/application.js:640:10)

I'm not that familiar with Node but I want to troubleshoot it. How do I clear the state? Password, added LND nodes etc. are remembered with new install. Where is that info stored?

janoside commented 5 years ago

@Espen11 Thanks for reporting this and thanks for helping troubleshoot. The state is in a single file ~/.lnd-admin/credentials.json. Deleting that and restarting should get you back to a clean slate. I'll try to troubleshoot on my end also.

janoside commented 5 years ago

@Espen11 Also, if you're able to view the /error-log page in the app, it may have more info about any background/internal errors that might've occurred when you activated your second node.

Espen11 commented 5 years ago

I can no longer reproduce this. Probably fixed