Recovery broken luci

Hi all...

I need some help...

My luci is broken when I access first screen...

Is there anyway to recovery it?

If here is a not correct local to post this, please, move this.

The problem occurs when I try to access the Overview page only - Others internal pages are correctly accessible.

Thanks

The big question would be what lead you to this situation.

If upgrading packages ended you up there, https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset should help you.

If not, try to connect via ssh and sysupgrade -n </tmp/image_name.bin> (which will drop your current configuration; obviously you have to scp -O the file there first).

Hello slh...

Honestly, I don't know what could have happened to make this happen...

I'm reconfiguring my x86 system and reinstalling everything again, it wouldn't be the best idea at the moment...

I'm looking for alternatives before I get to the issue of doing everything from scratch again... however, I can make a backup and follow the documentation we have on the website.

Upset about this little problem...

Thanks so far.

What did you do that immediately preceeded the broken luci situation?

Likely inconsistent LuCI package versions. Try this:

opkg remove "luci*"   (Might repeat a few times until no dependency errors occur anymore)
opkg install luci luci-compat
3 Likes

Hello jow...

I try first of all:

root@horus:~# opkg remove "luci*"

and I receive depedencies errors...

Removing package luci-app-nlbwmon from root...
Removing package luci-app-vnstat2 from root...
Removing package luci-ssl from root...
Removing package luci-mod-dashboard from root...
Removing package luci-lib-jsonc from root...
Removing package luci from root...
Removing package luci-light from root...
Collected errors:
 * print_dependents_warning: Package luci-app-opkg is depended upon by packages:
 * print_dependents_warning:    luci
 * print_dependents_warning: These might cease to work if package luci-app-opkg is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-mod-system is depended upon by packages:
 * print_dependents_warning:    luci-mod-admin-full
 * print_dependents_warning: These might cease to work if package luci-mod-system is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-theme-bootstrap is depended upon by packages:
 * print_dependents_warning:    luci-light
 * print_dependents_warning: These might cease to work if package luci-theme-bootstrap is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-mod-status is depended upon by packages:
 * print_dependents_warning:    luci-mod-admin-full
 * print_dependents_warning: These might cease to work if package luci-mod-status is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-app-firewall is depended upon by packages:
 * print_dependents_warning:    luci-light
 * print_dependents_warning: These might cease to work if package luci-app-firewall is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-proto-ppp is depended upon by packages:
 * print_dependents_warning:    luci-light
 * print_dependents_warning: These might cease to work if package luci-proto-ppp is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-mod-admin-full is depended upon by packages:
 * print_dependents_warning:    luci-light
 * print_dependents_warning: These might cease to work if package luci-mod-admin-full is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-base is depended upon by packages:
 * print_dependents_warning:    luci-mod-system
 * print_dependents_warning:    luci-mod-status
 * print_dependents_warning:    luci-mod-admin-full
 * print_dependents_warning:    luci-mod-network
 * print_dependents_warning: These might cease to work if package luci-base is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-proto-ipv6 is depended upon by packages:
 * print_dependents_warning:    luci-light
 * print_dependents_warning: These might cease to work if package luci-proto-ipv6 is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * print_dependents_warning: Package luci-mod-network is depended upon by packages:
 * print_dependents_warning:    luci-mod-admin-full
 * print_dependents_warning: These might cease to work if package luci-mod-network is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.

So, I try again using "--force-depends", like this:

topkg remove "luci*" --force-depends
Removing package luci-app-opkg from root...
Removing package luci-mod-system from root...
Removing package luci-theme-bootstrap from root...
Removing package luci-mod-status from root...
Removing package luci-app-firewall from root...
Removing package luci-proto-ppp from root...
Removing package luci-mod-admin-full from root...
Removing package luci-base from root...
Not deleting modified conffile /etc/config/luci.
Not deleting modified conffile /etc/config/ucitrack.
Removing package luci-proto-ipv6 from root...
Removing package luci-mod-network from root...

and after, I use the second command to install Luci again...

opkg install luci luci-compat
Installing luci (git-23.051.66410-a505bb1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci_git-23.051.66410-a505bb1_all.ipk
Installing luci-proto-ipv6 (git-21.148.48881-79947af) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-proto-ipv6_git-21.148.48881-79947af_all.ipk
Installing luci-app-firewall (git-23.285.27691-e23911e) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-app-firewall_git-23.285.27691-e23911e_all.ipk
Installing luci-base (git-23.292.78378-27fb6e5) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-base_git-23.292.78378-27fb6e5_x86_64.ipk
Installing luci-mod-status (git-23.292.78378-9adda4a) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-mod-status_git-23.292.78378-9adda4a_x86_64.ipk
Installing luci-mod-system (git-23.118.78765-58f7b27) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-mod-system_git-23.118.78765-58f7b27_all.ipk
Installing luci-mod-network (git-23.283.21598-257f54c) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-mod-network_git-23.283.21598-257f54c_all.ipk
Installing luci-mod-admin-full (git-19.253.48496-3f93650) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-mod-admin-full_git-19.253.48496-3f93650_all.ipk
Installing luci-proto-ppp (git-21.158.38888-88b9d84) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-proto-ppp_git-21.158.38888-88b9d84_all.ipk
Installing luci-theme-bootstrap (git-23.085.34270-d94a728) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-theme-bootstrap_git-23.085.34270-d94a728_all.ipk
Installing luci-light (git-23.024.33244-34dee82) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-light_git-23.024.33244-34dee82_all.ipk
Installing luci-app-opkg (git-23.009.82915-ec3aac4) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-app-opkg_git-23.009.82915-ec3aac4_all.ipk
Installing luci-compat (git-22.297.83017-673f382) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/luci/luci-compat_git-22.297.83017-673f382_all.ipk
Installing lua (5.1.5-10) to root...
Downloading https://downloads.openwrt.org/releases/23.05.0/packages/x86_64/base/lua_5.1.5-10_x86_64.ipk
Configuring luci-app-opkg.
Configuring luci-base.
Configuring luci-mod-system.
Configuring luci-theme-bootstrap.
/luci-static/bootstrap
Configuring luci-mod-status.
Configuring luci-app-firewall.
Configuring luci-proto-ppp.
Configuring luci-mod-network.
Configuring luci-mod-admin-full.
Configuring luci-proto-ipv6.
Configuring luci-light.
Configuring luci.
Collected errors:
 * resolve_conffiles: Existing conffile /etc/config/luci is different from the conffile in the new package. The new conffile will be placed at /etc/config/luci-opkg.
 * resolve_conffiles: Existing conffile /etc/config/ucitrack is different from the conffile in the new package. The new conffile will be placed at /etc/config/ucitrack-opkg.
 * opkg_install_pkg: Checksum or size mismatch for package lua. Either the opkg or the package index are corrupt. Try 'opkg update'.
 * opkg_install_cmd: Cannot install package luci-compat.

but the error continues :face_exhaling:

I´m trying to see the files in my other router to try copies between us, but I but I can't find them on the other router...
This is interesting, I think they should be present on the other router, right?

This router that has the problem is a minipc, so I'm using X86/64 on it, but that's certainly not a problem.

I will still research the problem a little more, try more things before redoing this router again.

Thank you for your help so far and I definitely don't know what could have caused this problem, nothing unusual was done on the router.

This is the culprit. The ucodebridge.lua module is part of the luci-lua-runtime which is a dependency of luci-compat. Your opkg complains about "Checksum or size mismatch for package lua" - did you try an opkg update before reinstalling LuCI? Maybe the Lua package(s) changed in the repo since you last updated your index.

2 Likes

Fantastic @jow!!!

Now it worked, but I did it this way!!! :clap: :clap:

First, I removed all installed packages with the command "opkg remove "luci" --force-depends*"...

Then I deleted the "luci.cfg" files and made a backup of the "ucitrack" file and then deleted both...

Following your advice, I ran an "opkg update"...

After the update, I installed normally luci with "opkg install luci" and as it still didn't work :angry: :face_with_symbols_over_mouth:, I installed it using your command "opkd install luci-compat"... :smiling_imp:

Now I'm going to install the "luci-app-*" packages that I already had before the problem. :+1:

Thanks a lot for the help!

If you need to manually install luci-compat you either have some app package with insufficient dependencies or you manually installed some Lua based LuCI code which is not packaged. Did you install any custom stuff in /usr/lib/lua/luci in the past?

I didn't install anything unusual, nothing I've ever used before, but it could be that some package got corrupted during the installation and caused Luci to crash, that's what I believe.

1 Like

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