No "Read / Reread log file" button in Luci

I'm using OpenWrt 22.03.1 and I set up duckdns using the config file listed here https://www.duckdns.org/install.jsp#openwrt

I have the DNS all set up and working as expected but I've noticed I cannot see any logs in Luci or well I don't see a button "Read / Reread log file" for my duckdns
image

When I SSH into the log folder I can see the log file

root@OpenWrt-b:/tmp/log/ddns# ls -l
-rw-r--r--    1 root     root         18872 Dec  9 13:43 duckdns.log
-rw-r--r--    1 root     root           606 Dec  6 09:03 myddns_ipv4.log

When I inspect the page I see the class is set to hidden ("cbi-value hidden")

<div id="container.ddns.duckdns.logview" data-tab="logview" data-tab-title="Log File Viewer" data-tab-active="true"><div class="cbi-value hidden" id="cbi-ddns-duckdns-_read_log" data-index="0" data-depends="[{&quot;cbid.ddns.duckdns.use_logfile&quot;:&quot;1&quot;,&quot;cbid.ddns.duckdns.service_name&quot;:&quot;-&quot;}]" data-field="cbid.ddns.duckdns._read_log" data-name="_read_log" data-widget="CBI.ButtonValue" data-idref="4779526c"><div><button class="cbi-button cbi-button-apply">Read / Reread log file</button></div><input id="cbid.ddns.duckdns._read_log" type="hidden" data-idref="c1af5f99"></div><p>This is the current content of the log file in /var/log/ddns for this service.</p><p><textarea style="width:100%" rows="20" readonly="readonly" id="log_area">Please press [Read] button</textarea></p></div>

And when I change this to "cbi-value" I can see the logs in Luci

Anyone know what is going on?

View after changing value to "cbi-value"

image

I think you have to set use_logfile in the /etc/config/ddns file as well, since that button depends on the value.

I read here https://openwrt.org/docs/guide-user/base-system/ddns#section_service that use_logfile is defaulted to 1 anyway.

I added it to my /etc/config/ddns and rebooted the service and the system but got the same result.

Here is my config file is there anything there that doesn't seem correct?

config service 'duckdns'
        option enabled '1'
        option domain '***.duckdns.org'
        option username '***'
        option password '***'
        option ip_source 'web'
        option ip_network 'wan'
        option ip_url 'https://ipv4.wtfismyip.com/text'
        option force_interval '72'
        option force_unit 'hours'
        option check_interval '10'
        option check_unit 'minutes'
        option update_url 'http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]'
        option lookup_host '***.duckdns.org'
        option use_logfile '1'

I've observed this too since version 21:

Disclaimer: I don't use this package, it's just a best guess!

The root cause might be a missing ACL for reading the log directory in https://github.com/openwrt/luci/blob/deebfa0b1f671cb8cca1e847aebfaa51eb63e06e/applications/luci-app-ddns/root/usr/share/rpcd/acl.d/luci-app-ddns.json

To test that, add the following to the read section of /usr/share/rpcd/acl.d/luci-app-ddns.json, e.g.

"file": {
				
        "/var/log/ddns/*": [ "read" ],
        [...]
		},

After the change restart the rpcd service and try again.

Are there any browser console errors when you load the page? Seems like you should have more tabs than what you show. Any adblocker that might be interfering?

I tried adding that as you can see from the below and rebooted the router but unfortunately it's still the same.

 -----------------------------------------------------
 OpenWrt 22.03.1, r19777-2853b6d652
 -----------------------------------------------------
root@OpenWrt-b:~# cat /usr/share/rpcd/acl.d/luci-app-ddns.json
{
        "luci-app-ddns": {
                "description": "Grant access to ddns procedures",
                "read": {
                        "ubus": {
                                "luci.ddns": [ "get_services_status", "get_ddns_state", "get_env", "get_services_log" ],
                                "luci": [ "setInitAction" ]
                        },
                        "file": {
                                "/var/log/ddns/*": [ "read" ],
                                "/usr/share/ddns/default": [ "list" ],
                                "/usr/share/ddns/default/*": [ "read" ],
                                "/usr/share/ddns/custom": [ "list" ],
                                "/usr/share/ddns/custom/*": [ "read" ],
                                "/usr/share/ddns/list": [ "read" ],
                                "/usr/bin/ddns": [ "exec" ],
                                "/usr/lib/ddns/dynamic_dns_lucihelper.sh": [ "exec" ]
                        },
                        "uci": [ "ddns" ]
                },
                "write": {
                        "uci": [ "ddns" ]
                }
        }
}
root@OpenWrt-b:~#

Nope, I've noting like that. I did notice the same thing as default service myddns_ipv4 has the extra tabs but I put that down to duckdns being a -- custom -- DDNS Service provider.

It's still the same result in Chrome, Opera and Firefox.