Help with Luci

I think I broke luci when i was trying to install luci-app-ddns and then did opkg upgrade luci-base

When i try to go to luci,

I get this:


/usr/lib/lua/luci/template.lua:97: Failed to execute template 'sysauth'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'header'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'themes/bootstrap/header'.
A runtime error occurred: [string "/usr/lib/lua/luci/view/themes/bootstrap/hea..."]:20: attempt to call field 'node_childs' (a nil value)
stack traceback:
	[string "/usr/lib/lua/luci/view/themes/bootstrap/hea..."]:20: in main chunk
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:97: in function 'render'
	/usr/lib/lua/luci/dispatcher.lua:755: in function 'include'
	[string "/usr/lib/lua/luci/view/header.htm"]:3: in main chunk
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:97: in function 'render'
	/usr/lib/lua/luci/dispatcher.lua:755: in function 'include'
	[string "/usr/lib/lua/luci/view/sysauth.htm"]:1: in main chunk
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:97: in function </usr/lib/lua/luci/template.lua:85>
	(tail call): ?
	(tail call): ?
	/usr/lib/lua/luci/dispatcher.lua:979: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:478: in function </usr/lib/lua/luci/dispatcher.lua:477>

Can anyone help me?

I really don't want to reset the router

Did you try to reboot (think you need a clear of the luck cache)

Yes, a couple of times. I think I night try to remove luci and reinstall. Would that be a bad idea?

What does 'opkg list-upgradable' says?

1 Like
root@OpenWrt:/rom/usr/lib/lua/luci# opkg list-upgradable
luci-proto-wireguard - git-20.140.38620-8d89f0d-1 - git-20.167.61968-87da00a-1
cgi-io - 16 - 19
opkg - 2020-01-25-c09fe209-1 - 2020-05-07-f2166a89-1
luci-app-opkg - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
wpad-basic - 2019-08-08-ca8c2bd2-2 - 2019-08-08-ca8c2bd2-4
rpcd - 2019-11-10-77ad0de0-1 - 2020-05-26-67c8a3fd-1
luci-lib-ip - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
luci-theme-bootstrap - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
luci-app-wireguard - git-20.140.38620-8d89f0d-1 - git-20.167.61968-87da00a-1
dnsmasq - 2.80-15 - 2.80-16.1
procd - 2020-01-24-31e4b2df-1 - 2020-03-07-09b9bd82-1
libuclient20160123 - 2019-05-30-3b3e368d-1 - 2020-06-17-51e16ebf-1
luci-mod-status - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
luci-app-firewall - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
uclient-fetch - 2019-05-30-3b3e368d-1 - 2020-06-17-51e16ebf-1
luci-ssl - git-20.134.55291-ba0fb08-1 - git-20.167.61968-87da00a-1
libubox20191228 - 2020-02-27-7da66430-1 - 2020-05-25-66195aee-1
rpcd-mod-file - 2019-11-10-77ad0de0-1 - 2020-05-26-67c8a3fd-1
odhcpd-ipv6only - 2019-12-16-e53fec89-3 - 2020-05-03-49e4949c-3
luci-proto-ppp - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
libjson-script - 2020-02-27-7da66430-1 - 2020-05-25-66195aee-1
luci-proto-ipv6 - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
libblobmsg-json - 2020-02-27-7da66430-1 - 2020-05-25-66195aee-1
jshn - 2020-02-27-7da66430-1 - 2020-05-25-66195aee-1
ca-certificates - 20190110-2 - 20200601-1
libjson-c2 - 0.12.1-3 - 0.12.1-3.1
uhttpd - 2020-02-12-2ee323c0-1 - 2020-03-13-975dce23-1
usign - 2019-08-06-5a52b379-1 - 2020-05-23-f1f65026-1
luci-lib-nixio - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
ca-bundle - 20190110-2 - 20200601-1
luci-lib-jsonc - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
rpcd-mod-iwinfo - 2019-11-10-77ad0de0-1 - 2020-05-26-67c8a3fd-1
luci-mod-network - git-20.057.55219-13dd17f-1 - git-20.167.61968-87da00a-1
hostapd-common - 2019-08-08-ca8c2bd2-2 - 2019-08-08-ca8c2bd2-4
wireless-regdb - 2019.06.03 - 2019.06.03-1

Did you read the warning about the risks: https://openwrt.org/docs/guide-user/installation/sysupgrade.cli ?

No, being new to openwrt, i pretty much read it after i broke luci.

Ok, I would suggest making a copy of all files from /etc/config/ (use scp because LuCI is broken). Then you could try upgrading all LuCI packages, but be ready to have to reset to factory defaults if that does not help.
I suspect that older LuCI packages you have installed do not match the base package you just upgraded.

2 Likes

That is how I learned things :slight_smile:

1 Like

I made a backup before attempting to install so i'm good there. I upgraded just luci-theme-bootstrap because it seemed like the errors were pointing there and it started working again! I'm super afraid of upgrading anything else now. Or rebooting. I just kinda want it to stay this way until my roommate's exams are over next week.

So for the future knowledge, was it wrong for me to upgrade luci-base initially? I did not check if it was listed in opkg list-upgradable. Is it alright to upgrade packages in that list or is there more checking involved on what can be upgraded?

Nha it's just that Luci have lots of subpackage and some of them needs to be updated at the same time if base is updated.

1 Like

As a general rule, you should never upgrade in place, because the OpenWRT is not designed to support this case. If you are afraid to upgrade the packages, then do not.
You can ask then why the upgrade functionality is there? You will hear answers that it is to support emergency and security one off patches, but I disagree with that notion.

1 Like

Okay, understood. So it's better to just do a full upgrade to a new release? Just making sure I understand.

In your case, probably yes. I personally just re-spin the entire firmware image a few times a month with all extra packages included into it, so I do not need to install or upgrade anything via opkg after the flash. This way all packages in my image are always consistent. Again, I do not recommend doing this without any troubleshooting experience.
P.S. Even though, your LuCI is working for you, it is still possible that some other parts of it are broken due to version incompatibility. Just keep that in mind. LuCI is not a part of routing, so the core router fictionally is not affected. Unless you upgraded some other packages of course :wink:

1 Like

Haha alright! I only upgraded that one and I'm not worried about luci. I'll flash it again in two weeks.

I personally just re-spin the entire firmware image a few times a month with all extra packages included into it

Re-spin? Like make your own firmware?

Yes, my own firmware file with all the packages I use.

1 Like

Nice! Not for me right now but perhaps in the future.

Thank you all for your help, I really appreciate it! :blush:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.