I use Webmin 1.941. Sometime, where loading "Stats History", get errors: "Ошибка: 500 - Perl execution failed – unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)")".
OS: Debian 8.11 / Linux 3.4.113-sun8i on armv7l.
Webmin language: Russian RU.UTF-8
Does anything get logged to /var/webmin/miniserv.error when this happens?
tail -f /var/webmin/miniserv.error
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
[11/Feb/2020:13:53:28 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:53:34 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:53:46 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:02 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:20 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:28 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:34 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
[11/Feb/2020:13:54:42 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:48 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:51 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
[11/Feb/2020:13:54:57 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:54:59 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:55:02 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:55:05 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
[11/Feb/2020:13:55:11 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.
Can you describe sometimes? Besides, can you send me the content of the following directory:
/etc/webmin/authentic-theme.Webmin work after installation or upgrade from version 1.930. And I get errors always after reboot. "Stats History" show message "Loading..."
There is inconsistency what is considered to be valid among what allowed in JSON strings, and what is not allowed in ECMAscript string literals. :-(
Besdies, @Andrej I have updated JSON:PP with the latest version, and updated convert_to_json sub.
It should resolve your issue. After editing
web-lib-funcs.plfile, you would need to restart Webmin, running:I updated two files: PP.pm and web-lib-funcs.pl. Restarted webmin. But i get errors:
[13/Feb/2020:15:38:35 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10955. Line number changed to 10955.
What json file parsed webmin with errors?
Okay, is there a way you can send me the content of
/etc/webmin/authentic-theme?In attachment
File stats-root.json was corrupted. I delete this file and webmin work without errors. :-)
Please replace this file to /var/webmin and create new file after reboot.
Last edit: Andrej Taran 2020-02-13
Well, sure thing but the question is how did you end up having that file being corrupted?
It sounds like there is an improvement needed for
convert_from_jsonsub. I'll study on the attached files when get back to PC.Thanks for your feedback!
Okay. I see now how you ended up with this error. I have made a patch to prevent this from happening in the future.
Thanks for reporting! ;)
Ok. Last patch work very well. Thanks
Good to know! Thanks.