webui
webui copied to clipboard
/var/www/cgi-bin/firmware.cgi takes minutes to load without Internet connection
/var/www/cgi-bin/firmware.cgi is meant to look up the newest firmware version on Github during load if there is an Internet connection. However, the logic used is very brittle: It assumes you can reach the entire Internet if a network_gateway is set. This breaks when you have your camera on a local network, but firewalled to deny broad Internet access. The check for the newest firmware version runs into a timeout in this case and the page eventually loads, but it takes minutes and looks to the user like something has crashed/failed.
The firmware update page is still very useful when there is no Internet access, as the user can manually download and provide updated rootfs and kernel files.
Thank you for your interest in the project What ideas do you have to solve this issue?
Please also note that one of our colleagues is currently experimenting with new approaches in the webui-next repository; perhaps you can find something there or apply something new.
I would set a timeout on the curl command that checks for the newest version on GitHub and if the timeout is hit, show the same error message as you do when no network is available.