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.
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 192.168.1.1, so also make sure that this IP is not in use by anything else.
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)
UPDATE
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.