Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuCi: DHCP and DNS option fails #7506

Open
1 task done
rastersoft opened this issue Dec 25, 2024 · 8 comments
Open
1 task done

LuCi: DHCP and DNS option fails #7506

rastersoft opened this issue Dec 25, 2024 · 8 comments

Comments

@rastersoft
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

screenshots or captures

Captura desde 2024-12-25 23-51-08

Actual behaviour

I went to DHCP and DNS option in OpenWrt 24.10.0-rc4 and it shows that error. It works fine in OpenWrt 23.05.5

Expected behaviour

It should show the DHCP and DNS screen.

Steps to reproduce

Go to Network -> DHCP and DNS

Additional Information

NAME="OpenWrt"
VERSION="24.10.0-rc4"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 24.10.0-rc4"
VERSION_ID="24.10.0-rc4"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r28211-d55754ce0d"
OPENWRT_BOARD="ramips/mt7621"
OPENWRT_ARCH="mipsel_24kc"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 24.10.0-rc4 r28211-d55754ce0d"
OPENWRT_BUILD_DATE="1734915335"

What browsers do you see the problem on?

Firefox

Relevant log output

No response

@systemcrash
Copy link
Contributor

Please paste the output from the browser console. (Ctrl+alt+k or so?)

@rastersoft
Copy link
Author

rastersoft commented Dec 25, 2024

Here it is:

TypeError: nodes.querySelector(...) is null
    renderContents https://192.168.0.251/luci-static/resources/view/network/dhcp.js?v=24.357.59006~41cbd31:49
    promise callback*render/s.renderContents https://192.168.0.251/luci-static/resources/view/network/dhcp.js?v=24.357.59006~41cbd31:49
    promise callback*render https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:159
    renderChildren https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:34
    renderContents https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:48
    promise callback*render https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:48
    render https://192.168.0.251/luci-static/resources/view/network/dhcp.js?v=24.357.59006~41cbd31:112
[luci.js:154:9](https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31)

Uncaught (in promise) TypeError: nodes.querySelector(...) is null
    renderContents https://192.168.0.251/luci-static/resources/view/network/dhcp.js?v=24.357.59006~41cbd31:49
    promise callback*render/s.renderContents https://192.168.0.251/luci-static/resources/view/network/dhcp.js?v=24.357.59006~41cbd31:49
    promise callback*render https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:159
    renderChildren https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:34
    renderContents https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:48
    promise callback*render https://192.168.0.251/luci-static/resources/form.js?v=24.357.59006~41cbd31:48
    render https://192.168.0.251/luci-static/resources/view/network/dhcp.js?v=24.357.59006~41cbd31:112
[luci.js:49:647](https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31%20line%20171%20%3E%20eval)
    error https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:158
    (Asíncrono: promise callback)
    __init__ https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:139
    super https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:15
    ClassConstructor https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:5
    compileClass https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:175
    (Asíncrono: promise callback)
    compileClass https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:171
    (Asíncrono: promise callback)
    require https://192.168.0.251/luci-static/resources/luci.js?v=24.357.59006~41cbd31:177
    instantiateView https://192.168.0.251/luci-static/resources/ui.js?v=24.357.59006~41cbd31:369
    <anonymous> https://192.168.0.251/cgi-bin/luci/admin/network/dhcp:50
    (Asíncrono: promise callback)
    <anonymous> https://192.168.0.251/cgi-bin/luci/admin/network/dhcp:49

@rastersoft
Copy link
Author

And as capture:
imagen

@systemcrash
Copy link
Contributor

Please share the contents of your /etc/config/dhcp file. You can redact any settings you think sensitive.

@systemcrash
Copy link
Contributor

systemcrash commented Dec 26, 2024

At a guess it appears as though you might not have any dnsmasq section entries (or they were deleted?).

Are you able to say how that might have happened?

@systemcrash
Copy link
Contributor

Until there is better handling of this situation, you can add the following to your /etc/config/dhcp

config dnsmasq

And go to the GUI and tweak your settings.

@rastersoft
Copy link
Author

Confirmed: adding that "fixes" the problem. Thanks!

@adelton
Copy link
Contributor

adelton commented Jan 9, 2025

To figure out if this is a regression or if LuCI has been always behaving this way for missing config dnsmasq, I've made /etc/config/dhcp and empty file with echo -n > /etc/config/dhcp. With OpenWrt 23.05.5 (r24106-10cc5fcd00) the /cgi-bin/luci/admin/network/dhcp says

Dnsmasq is a lightweight DHCP server and DNS forwarder.
This section contains no values yet
Screenshot_2025-01-09_22-04-10

So there is some error message there but it does not really provide a good way to recover anyway -- it is not possible to click Add with just an empty textfield to create the global config dhcp.

I did not try on 24.* if a completely empty /etc/config/dhcp would trigger the TypeError behaviour or the original 23.* error message.

@systemcrash Have you got any hints / guidance to what might have changed in 24 vs. 23, and what the general recovery mechanism for this situation should be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants