[ZBX-15145] Graphics Time Interval works only on first time Created: 2018 Nov 08 Updated: 2019 Jan 27 Resolved: 2018 Dec 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 4.0.1 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Rodrigo Dewes | Assignee: | Unassigned |
Resolution: | Workaround proposed | Votes: | 0 |
Labels: | frontend, graph, time | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Linux Server, Chrome on Linux |
Attachments: |
![]() |
Description |
Steps to reproduce:
Result: It works when selecting the first of the time intervals but any other after that it will not work or update. After a page reload I can choose another, but it only works for the first selected. Expected:
Also, I get some JS errors: jsLoader.php?ver=4.0.1&lang=pt_BR&showGuiMessaging=1&files[]=class.calendar.js&files[]=gtlc.js&files[]=flickerfreescreen.js&files[]=layout.mode.js&files[]=servercheck.js:1662 Uncaught TypeError: Cannot read property 'id' of undefined
|
Comments |
Comment by Aigars Kadikis [ 2018 Dec 06 ] |
Hello Rodrigo, Your dedicated scenario should work. Switching zoom does not require to reload page inside browser. Please try crear browser cache. Make sure you do not have some extensions active in Chrome which can manage some scripting. Try guest/incognito mode. Try different browser. Does your front-end version (on the bottom of screen) match with the version of zabbix daemon? zabbix_server -V Regards, |
Comment by Sven Schiwek [ 2018 Dec 17 ] |
Hi, Firefox 63.0.3 error message is: TypeError: screen is undefined[Learn More] jsLoader.php:1660:9 refreshAll https://mydomain/zabbix/jsLoader.php:1660:9 <anonymous> https://mydomain/zabbix/jsLoader.php:1194:3 dispatch https://mydomain/zabbix/jsLoader.php:12132:15 add/elemData.handle https://mydomain/zabbix/jsLoader.php:11804:6 trigger https://mydomain/zabbix/jsLoader.php:12045:5 trigger/< https://mydomain/zabbix/jsLoader.php:12729:4 each https://mydomain/zabbix/jsLoader.php:7695:14 each https://mydomain/zabbix/jsLoader.php:7304:10 trigger https://mydomain/zabbix/jsLoader.php:12728:10 $.publish https://mydomain/zabbix/jsLoader.php:757:3 success https://mydomain/zabbix/jsLoader.php:981:6 fire https://mydomain/zabbix/jsLoader.php:10086:10 fireWith https://mydomain/zabbix/jsLoader.php:10198:7 done https://mydomain/zabbix/jsLoader.php:15273:5 callback https://mydomain/zabbix/jsLoader.php:15816:8 Also Apple Safari 12.0.2 throws the same error message. Zabbix version: # zabbix_server -V zabbix_server (Zabbix) 4.0.2 Revision 87228 26 November 2018, compilation time: Dec 6 2018 02:57:56 Copyright (C) 2018 Zabbix SIA License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it according to the license. There is NO WARRANTY, to the extent permitted by law. Compiled with GnuTLS 3.5.19 Running with GnuTLS 3.5.19 |
Comment by Aigars Kadikis [ 2018 Dec 18 ] |
Hello Sven, Thanks for coming back. Now I start to wonder what can be the root cause. What exactly you meant by "Debian testing"? Did you install Zabbix using repo?:
https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb
Can it be possible you have an HTTP proxy server between the client and Zabbix server? Any HA (High Availability) setup on the frontend. |
Comment by Sven Schiwek [ 2018 Dec 19 ] |
Hi Aigars, We installed the Zabbix packages via the official Debian repositories (Testing release) with the normal Debian package manager "apt-get". In our environment we have no proxy or firewall between the Zabbix Server and the browser. |
Comment by Sven Schiwek [ 2018 Dec 19 ] |
Hi Aigars, to verify my idea about a potential problem with the Zabbix migration process I created a new VMware instance an installed a fresh Debian 10 (alias Buster) and Zabbix (4.0.2). Do you know if the PHP version could be a problem? Debian 10 (alias Buster) is shipped with version 7.3.0. |
Comment by Aigars Kadikis [ 2018 Dec 27 ] |
Hello Sven, Thank you for investigation. Currently I am looking at the appliance version 4.0.3 of Zabbix which hosts on the top of Ubuntu (also Debian kind of distribution). I can see there is PHP version 7.0.32 used. Hopefully, Zabbix will be supported on Debian 10 (Buster) when the Buster will come out stable somewhere in 2019. Right now I will close the issue as Workaround proposed. You can see currently supported Debian versions at: https://www.zabbix.com/download?zabbix=4.0&os_distribution=debian&os_version=stretch&db=MySQL Keep up the good work! |
Comment by richlv [ 2018 Dec 27 ] |
Zabbix requirements state that PHP "5.4.0 or later" is supported, thus one might expect PHP 7.3.0 to work. It also seems that the cause for the problem has not been determined yet, is that correct? |
Comment by Aigars Kadikis [ 2018 Dec 27 ] |
Yes, richlv. We do not know the root cause yet. Either not quite sure if it is safe to use packages from other sources than repo.zabbix.com. |
Comment by richlv [ 2018 Dec 27 ] |
It seems crucial that the official distribution packages of Zabbix work flawlessly. Sven, to eliminate the possibility of Debian patches causing any issues, can you please try with a vanilla Zabbix frontend of the same version? You can grab it from the Zabbix sources or SVN, place in a separate directory and copy over the config file. |
Comment by Mark Presling [ 2019 Jan 09 ] |
For future reference: This is caused by the Debian packaging of the app replacing the source prototype.js (1.6.1) with the version provided by the Debian package libjs-prototype which is version 1.7.1. # ls -al `dpkg -L zabbix-frontend-php | grep prototype.js` lrwxrwxrwx 1 root root 42 Dec 24 18:55 /usr/share/zabbix/js/vendors/prototype.js -> ../../../javascript/prototype/prototype.js This appears to be for security/maintenance reasons. @Aigars Kadikis, is there any chance that flickerfreescreen.js could be updated to loop through the "prototyped" Array object using Object.keys() so that it doesn't loop through all the functions as well? 'toJSON' is undefined, which causes it to blow up. Here's an example of what does work:
Object.keys(window.flickerfreeScreen.screens).forEach((value, index) => {
console.log(index, value, window.flickerfreeScreen.screens[value]);
})
I think there might be a few places where flickerfreescreen.js is using associative arrays (which don't really exist in JS) naively - but I'm not a Javascript person, so I can't be sure what the norm is these days. |
Comment by Sven Schiwek [ 2019 Jan 27 ] |
The prototype.js problem is fixed in Debian package version 4.0.3+dfsg-2 (see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919496) and related bug # ls -al `dpkg -L zabbix-frontend-php | grep prototype.js` -rw-r--r-- 1 root root 142414 Dec 20 05:24 /usr/share/zabbix/js/vendors/prototype.js Graphics time interval works again. |