"Flash new firmware image" question with uhttpd at 19.07.8

Hi all,

I'm working on our own developing project with 19.07.8.
Our web server is uhttpd, and I try to do system upgrade from webUI.

When system upgrade progress, I expect the webUI will be blocked, like above image.
But, I received 500 Internal Error and empty webUI.
I checked the response from web server, please check following message.

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Status: 500 Internal Server Error
/usr/lib/lua/luci/template.lua:97: Failed to execute template 'admin_status/index'.
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..."]:13: attempt to index local 'boardinfo' (a nil value)
stack traceback:
	[string "/usr/lib/lua/luci/view/themes/bootstrap/hea..."]:13: 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/admin_status/index.h..."]: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): ?
	/usr/lib/lua/luci/dispatcher.lua:1020: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:984: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:478: in function </usr/lib/lua/luci/dispatcher.lua:477>

I double check the "ubus call system board", it works well before switch to ramdisk.

root@aa-0e9d:/# ubus call system board
{
        "kernel": "4.9.217",
        "hostname": "aa-0e9d",
        "system": "Realtek AA",
        "model": "aa",
        "board_name": "realtek,aa",
        "release": {
                "distribution": "OpenWrt",
                "version": "1.0.0.014",
                "revision": "r11364-ef56c85848",
                "target": "aa/bb",
                "description": "OpenWrt 1.0.0.014 r11364-ef56c85848"
        }
}

Another interesting part, I use nginx instead of uhttpd. The problem is gone.
I have no idea to fix/debug this issue.

Anyone have such experience to debug or resolve this issue? please help. Thanks.

Anyone can help? Thanks.

It is not clear to me what the actual problem is. The modal overlay you shown above usually prevents interacting with the gui. Do you see the 500 error instead of the modal or when attempting to navigate to the ui while the upgrade is running? What parts of the system did you modify?

Hi @jow,

We can see 500 error while the upgrade is running from webUI.
If we use sysupgrade command to try system upgrade, anything looks good.

About uhttpd or nginx, we did not change anything.
We implement the /lib/upgrade/platform.sh script to do system upgrade.

Thanks.

Hi @jow ,

Any suggestions? Thanks.

That part I don‘t understand. There should be a modal overlay with a spinner animation, no further HTTP requests once the upgrade process started. Can you provide a screenshot or screen capture of the issue?

Hi @jow,

Thanks. Please check following screen capture.

  1. This one is nginx, when I clicked upgrade, WebUI will block here and wait device back.

  2. Another one is uhttpd, when I clicked upgrade, WebUI will be blank and show some error at content.

If you need more info, we can provide it. Thanks.