/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>
If you haven't any ideas I will close the topic and put the solution is to run "firstboot"...
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]
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.
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.
@jow
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.
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.
@jow
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.
Regressing to 18.06.7 allows me to recover, but I did have a heart attack when 18.06.8 failed
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
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.