You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have too many devices and thus even in the normal openwrt 22 cli, ubus call network.device status throws a time out.
Entirely my problem, but through this time out
fails.
This in turn results in an empty report in this in a HTTP 400 from the openwisp server.
The solution could be to either check every variable, before pairs is used on it and omit this part in the report, if there should be an error, or to abort the whole script, if ubus:call has an error.
The text was updated successfully, but these errors were encountered:
as every timeout is 30 seconds I just did test 6 calls, but yes, even after 6 calls it always times out. But this is a problem of the ubus command line tool and should probably a report somewhere else.
openwrt-openwisp-monitoring's Line 123 and Line 112's problem is missing input sanitization which subsequently led in my case to errors like #101 or #102
In my opinion it should be something like
if type(x) == "table" then
for a, b in pairs(x) do
...
else
[errorreport]
For my case, I changed L65 to local network_status = {} for now to get at least all the other informations. A filter in the ubus:call in L65 would have worked too, but I was too lazy to recode L124ff
nemesifier
changed the title
'pairs' on unexpected variable value
[bug] 'pairs' on unexpected variable value
Aug 21, 2023
I have too many devices and thus even in the normal openwrt 22 cli,
ubus call network.device status
throws a time out.Entirely my problem, but through this time out
openwrt-openwisp-monitoring/openwisp-monitoring/files/sbin/netjson-monitoring.lua
Line 65 in 6709f35
openwrt-openwisp-monitoring/openwisp-monitoring/files/sbin/netjson-monitoring.lua
Line 123 in 6709f35
This in turn results in an empty report in this in a HTTP 400 from the openwisp server.
The solution could be to either check every variable, before
pairs
is used on it and omit this part in the report, if there should be an error, or to abort the whole script, ifubus:call
has an error.The text was updated successfully, but these errors were encountered: