Environment
- Proton2025 v1.3.0
- OpenWrt router with
luci-theme-proton2025, luci-base, rpcd, rpcd-mod-luci, and uhttpd installed
Problem
After opening LuCI, the browser console reports:
[Proton2025] Failed to sync from UCI: SyntaxError: Unexpected token "<", "<h1>Not Fo"... is not valid JSON
The error originates from settings-sync.js in syncFromUci(). The script calls response.json() without checking the HTTP response.
Investigation
The RPC object itself is available and works locally:
ubus list luci.proton-settings
ubus call luci.proton-settings getSettings
Both commands succeed; getSettings returns the expected settings object.
However, the HTTP endpoints used by settings-sync.js are unavailable on this router:
curl -i -H "Content-Type: application/json" --data "{}" http://ROUTER/ubus
curl -i -H "Content-Type: application/json" --data "{}" http://ROUTER/ubus/
Both return:
HTTP/1.1 404 Not Found
Content-Type: text/html
<h1>Not Found</h1>
The installed uhttpd configuration has no ubus_prefix or ubus socket configuration, and no HTTP ubus gateway module is installed.
Expected behavior
- Theme installation should either ensure the HTTP ubus gateway required by
settings-sync.js is available/configured, or use the supported LuCI RPC path for the target OpenWrt release.
settings-sync.js should check response.ok and the response content type before calling response.json(), then log a clear actionable error instead of a JSON SyntaxError.
This does not affect the theme RPC backend itself; it only breaks browser-to-UCI synchronization.
Environment
luci-theme-proton2025,luci-base,rpcd,rpcd-mod-luci, anduhttpdinstalledProblem
After opening LuCI, the browser console reports:
The error originates from
settings-sync.jsinsyncFromUci(). The script callsresponse.json()without checking the HTTP response.Investigation
The RPC object itself is available and works locally:
Both commands succeed;
getSettingsreturns the expected settings object.However, the HTTP endpoints used by
settings-sync.jsare unavailable on this router:Both return:
The installed
uhttpdconfiguration has noubus_prefixor ubus socket configuration, and no HTTP ubus gateway module is installed.Expected behavior
settings-sync.jsis available/configured, or use the supported LuCI RPC path for the target OpenWrt release.settings-sync.jsshould checkresponse.okand the response content type before callingresponse.json(), then log a clear actionable error instead of a JSONSyntaxError.This does not affect the theme RPC backend itself; it only breaks browser-to-UCI synchronization.