Recent upgrade broke Luci

So to resume:

The problem

After I flash(I checked the option to keep config berore I flash it...) the my TP-Link TL-WA901NND v4 (from 18.06.5 to 18.06.8) my Luci enviroment broke.

/usr/lib/lua/luci/dispatcher.lua:234: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:234: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:127: in function </usr/lib/lua/luci/dispatcher.lua:126>

The Solution

So the only solution founded was connect through Putty(SSH) with user and password.

And follow type this commands:

root@LEDE:~# mount_root
root@LEDE:~# firstboot
This will erase all settings and remove any installed packages. Are you sure? [N/y]
/dev/mtdblock3 is mounted as /overlay, only erasing files
root@LEDE:~# reboot -f

After this the Luci enviroment will work but you will need setup the router again.

Thanks everyone for the help!

1 Like

Add following lines to /etc/config/rpcd

config rpcd
option socket /var/run/ubus.sock
option timeout 30

1 Like

Same issue today with TL-WR741nd v1 - upgrade was from v. 18.06.6 to 18.06.8 keeping the settings as I always do (countless times so far) but Luci just throws this message:

/usr/lib/lua/luci/dispatcher.lua:234: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:234: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:127: in function </usr/lib/lua/luci/dispatcher.lua:126>

I'm afraid to upgrade other 4 TP-Link routers (different models) that currently use 18.06.6

Some configuration seemingly causes the problem. So far I couldn't reproduce it with naive testing. Could you share your complete uci show output? Preferably via PM, make sure to redact any secrets.

I've sent you the output via PM.
Can I downgrade to a previous version via SSH.

1 Like

Yes, while connected via SSH perform the following commands. Make sure to pick the right sysupgrade image for your board from and replace https:// with http:// when copy pasting the link.

cd /tmp
sysupgrade openwrt-18.06.7-ar71xx-tiny-tl-wa901nd-v1-squashfs-sysupgrade.bin
1 Like

Thanks. Will the above commands preserve the settings or they will be reset to default ones.
Did you get anything useful from the data I've sent you.

The above commands should preserve your settings.

Unfortunately not, I am still not able to reproduce the problem, even when restoring your uci configs. Either the issue is model specific, or the problem is introduced by non-uci configuration.

I've just downgraded to 18.06.7 - Luci is OK.
Decided to play a little. Once again upgraded to 18.06.8 (this time from 18.06.7) - Luci is broken with same message.
Then downgraded to 18.06.7 - for now will keep that version.

In the reply to @jow - first part of the post I presented the fix that worked for me:

I've upgraded two other routers TP-Link TL-WR841N/ND v7 and v8 to 18.06.8 - Luci is OK.

Just to add, I have a TP-Link TL-WA901N v3 and I'm seeing the same problem.

I also tried the forum posting, but also without success

Regressing to 18.06.7 allows me to recover, but I did have a heart attack when 18.06.8 failed :wink:

As someone else mentioned, I have always had successful upgrades, but took a configuration backup - just in case.

If I have some time in the next few days, when everyone isn't using the wifi, then I can investigate further - but I just thought that I would add a "me too" post here



If nothing works flash the old version with the option uncheck "keep the config".

Setup the router and wait that one new version fixed this problem...

thank you very much! downgrade via SSH. Saved my life! kkk
I am using the 941ND tplink

I can confirm this bug on these devices:

TL-WR940N v4
TL-WA801ND v2
TL-WR741ND v1

All upgraded from 18.06.7 to 18.06.8 (sysupgrade via Luci while keeping settings), which broke Luci.

Fixed it by setting back to factory defaults, then reconfigured. Curiously, to exactly the same settings as before the upgrade, which then worked flawlessly.

So... are you now running 18.06.8 successfully - or are you saying you had to go back to 18.06.7?

(Just making sure I understand)

It definitely looks like the factory reset is fixing this for most in this thread...

Trouble is, for me, the factory reset is a pain as the WAP is in an awkward location :slight_smile: - so I want to make sure I do this once :wink:

18.06.8 is running perfectly after the factory reset.

After the broken upgrade I used ssh (firstboot) on two devices. On one ssh was deactivated, there I used the hardware reset button. So if your device is hidden behind your fridge make sure ssh is working before upgrading.

Or maybe try the upgrade without checking "keep settings". I have not tried that because I was hoping for luck...

After the factory reset you reach your device at, so also make sure that this IP is not in use by anything else.

1 Like

I have a sneaking suspicion: All here mentioned problematic devices are 4/32.
Maybe this is why nobody of the sysadmins can reproduce it.

I don't have a solution, but perhaps a workaround
With the same issue, I went to a new browser install (Firefox) and was able to access Luci OK whilst my "old browser" install continued to fail login (just sit without doing anything as above)

If I set the Firefox privacy settings as follows in "about:config"

  • privacy.resistFingerprinting = true
  • browser.display.use_document_fonts = 0
  • privacy.trackingprotection.enabled = true
  • webgl.disabled = true

then access fails again

If I reset the above to their original settings, login still fails !!
This is weird
Furthermore, i changed each of the above 1 at a time and logged out of the router home page and could log back in each time ... BUT when I restarted the browser I could no longer log in ie. it appears the changes only took effect when the browser restarted AND setting the attributes back to their original values didn't fix the problem

What's even stranger is that I have 2 routers (TPL 1043ND and TPL WDR3600) running the same version of OpernWRT, the 1024 has the problem but the 3600 does not

Go to a firefox install on which the above attributes have never set and Luci works - no changes on the router

Clearing the browser cache and cookies has no impact

Chromium is somewhat the same, sometimes works and sometimes not but I have not investigated why

Cannot currently explain this.
Try a new browser install and see what happens (I use LXD containers on Ubuntu PC so easy to create a new one for this purpose)

Deleting (or moving) the directory found at about:support / Profile Directory then restarting Firefox will clear whatever the problem was ... at the expense of removing addons, bookmarks, cache etc.

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