[ZBX-16605] Widget filter - Invalid parameter "Host groups/1" Created: 2019 Sep 05 Updated: 2024 Apr 10 Resolved: 2019 Oct 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 4.2.6 |
Fix Version/s: | 4.0.14rc1, 4.2.8rc1, 4.4.1rc1, 5.0.0alpha1, 5.0 (plan) |
Type: | Problem report | Priority: | Blocker |
Reporter: | Steve Calvário | Assignee: | Miks Kronkalns |
Resolution: | Fixed | Votes: | 9 |
Labels: | frontend, widgets | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 9 libapache2-mod-php => 1:7.0+49 opsgenie-zabbix => 2.22.0 |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||
Issue Links: |
|
||||||||||||||||
Team: | |||||||||||||||||
Sprint: | Sprint 57 (Oct 2019) | ||||||||||||||||
Story Points: | 0.5 |
Description |
Steps to reproduce:
Result: Expected: Information sent by the web browser: type=problems name fields=\{"rf_rate":"-1","show":"1","groupids":"[\"39\"]","problem":"","evaltype":"0","tags":\{"0":\{"tag":"","operator":"0","value":""}},"show_tags":"0","show_suppressed":"0","unacknowledged":"0","show_latest_values":"0","sort_triggers":"4","show_timeline":"1","show_lines":"25"} |
Comments |
Comment by Alexey Pustovalov [ 2019 Sep 07 ] |
Hello Steve, `Did you try 4.2.5 frontend? Does it work properly? |
Comment by Steve Calvário [ 2019 Sep 09 ] |
Hello Alexey, It's working on 4.2.4 and 4.2.5. We faced the issue after upgrading from 4.2.5 to 4.2.6 Thank you and best regards. |
Comment by DaneT [ 2019 Sep 18 ] |
Calvario it could be related to JSON and PHP library versions used by your installation. |
Comment by Steve Calvário [ 2019 Oct 01 ] |
Hello Marcis, Yesterday afternoon I upgraded the PHP version from 7.0 to 7.3 and still faced the same issue. After that, I upgraded Zabbix from 4.2.6 to 4.4.0beta1 and the issue is now affecting all the widgets. Some widgets that were not impacted on the 4.2.6 are now stuck with errors. (Print screen attached) Example of errors:
The widget for "Screen" provide an error, but it's the only widget after editing it and adding the values again that work again. After some investigation, the double "escaping" occur on the "prototype.js" function "inspect(useDoubleQuotes)" : Thank you and best regards. |
Comment by Oleksii Zagorskyi [ 2019 Oct 01 ] |
Steve, clarify please. Was you able to fix it? |
Comment by Steve Calvário [ 2019 Oct 01 ] |
Hello Oleksiy, Sorry if it was not clear enough, I was not able to fix it but only find out the function that is adding the extra "\". It's only a clue, sadly this file was not changed looking at the git history, so I guess Marcis was right about something related to the JSON itself.
You can find below all the steps from the beginning of the AJAX call until this function:
Example, when it's on the dashboard.grid.js#2260 the content of "fields" for "JSON.stringify(fields);" is the following : fields: {…} evaltype: "2" hostids: (1) […] 0: "247352" length: 1 <prototype>: [] problem: "" rf_rate: "-1" show: "1" show_lines: "5" show_opdata: "0" show_suppressed: "0" show_tags: "0" show_timeline: "0" sort_triggers: "4" tags: Object(1) unacknowledged: "0"
When the hostid : "247352" arrive into prototype.js#578 the return is "\"247352\"" After, when it's the return of prototype.js#1059, the value is "[\"247352\"]"
Then this is the content of the "fields" sent on the AJAX call : {"rf_rate":"-1","show":"1","hostids":"[\"247352\"]","problem":"","evaltype":"2","tags":{"0":{"tag":"","operator":"0","value":""}},"show_tags":"0","show_suppressed":"0","unacknowledged":"0","show_opdata":"0","sort_triggers":"4","show_timeline":"0","show_lines":"5"}
Thank you. |
Comment by Guilherme Duarte [ 2019 Oct 02 ] |
Hello guys, Does anyone solve this issue? After Zabbix Server and Frontend version upgrade from version 4.2.5 to 4.2.6 I've been facing this problem. Before the upgrade everything was working just fine. Thank you and best regards. |
Comment by Oleksii Zagorskyi [ 2019 Oct 03 ] |
I wonder, could it be a browser specific issue? |
Comment by Guilherme Duarte [ 2019 Oct 03 ] |
Hi Oleksiy, I don't think so, because I've already used Opera, Mozilla Firefox and Google Chrome the same issue. The old version was woking. I'm still looking for what could it be. Are you facing the same issue? Thank you and best regards. |
Comment by Oleksii Zagorskyi [ 2019 Oct 03 ] |
Thanks. I have the issue on a remote installation (v 4.0.12), where I have not access to, but I need to resolve that too. |
Comment by SuNova [ 2019 Oct 04 ] |
I have the same problem after upgrading fro 4.2.x to 4.4.0rc1. |
Comment by gb [ 2019 Oct 06 ] |
Same with 4.2.7, new install on debian 9. A short investigation shows that jsLoader cannot parse correct cookie. cookie.read('localstoragePath') returns NULL. When it try to read document.cookie contrains only last part of it 'tab=1'. If I manually insert correct value for cookie.read('localstoragePath') everything is ok. It seems like race contition... Something modify document.cookie
|
Comment by Guilherme Duarte [ 2019 Oct 09 ] |
Hi guys, We tried to upgrade from 4.2.7 to 4.4.0 in our test environment nothing happens, still the same issue. We have a CentOS 7 virtual machine with PHP 7.2, Apache 2.4.6 and PostgreSQL 10. Thank you and best regards. |
Comment by Guilherme Duarte [ 2019 Oct 09 ] |
Hi guys, Let me say What I've done:
The issue still remains so I try to edit the dashboards so I've seen a strange behavior on the name field instead of dashboard name showed me my zabbix user name. Then I've edited to dashboard to its old name and click apply button it made back to normal. But after a simple page refresh or if I save changes on Dashboard painel the issue remains. In our Apache configuration security modules are enable: mod_security For Grafana dashboards don't work normaly when Apache mod_evasive is enabled. We'll try Today I've tried and nothing happens still the same. If I have some news I'll post it here. PS: I've added some images. Thank you and best regards.
|
Comment by Alex Olshansky [ 2019 Oct 11 ] |
I have the same issue on a fresh install of 4.4 Edit: Only exception I see is: uncaught exception: Local storage instantiation must be versioned, and prefixed. jsLoader.php:12197:3 ZBX_LocalStorage https://mydom.com/jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:12197 <anonymous> https://mydom.com/jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:12717 |
Comment by Veeresh K [ 2019 Oct 12 ] |
Same issue on:
|
Comment by Valdis Murzins [ 2019 Oct 14 ] |
Hello, The problem seems to be because of extra hardening in web server configuration. This is also explained in |
Comment by Alex Olshansky [ 2019 Oct 14 ] |
My issue ended up being caching that was set too aggressively by the TCP proxy sitting in front of Zabbix front end. Resolved simply by disabling and clearing cache. I do still see Zabbix cookies being set with httpOnly and Secure flags, but it doesn't seem to affect Web GUI functionality. Maybe devs realized it wasn't a good decision to simply ignore the issue since it isn't always possible to disable secure cookies and fixed it? |
Comment by Guilherme Duarte [ 2019 Oct 14 ] |
Hello guys, After what Valdis Murzins commented We check our httpd.conf file and commented this part: <IfModule mod_headers.c> So everything works just fine. In the issue ZBX - 16580 "We discussed the issue with development team. Conclusion is that there is no need to use additional security hardening because Zabbix cookies are already secured. Enabling additional security breaks Zabbix functionality. This is not a bug in Zabbix." Does anyone know if this still the same in the latest version? Thank you and best regards. |
Comment by Veeresh K [ 2019 Oct 15 ] |
I dont have such configuration in my httpd.conf file and yet the issue persists. Does using php-fpm have any such concerns? |
Comment by Miks Kronkalns [ 2019 Oct 16 ] |
Fixed in development branch feature/ZBX-16605-4.0 |
Comment by SuNova [ 2019 Oct 20 ] |
Last commit worked for me Miks Kronkalns. Many thanks! |
Comment by Miks Kronkalns [ 2019 Oct 21 ] |
Good to hear SuNova! Thank you for feedback. |
Comment by Miks Kronkalns [ 2019 Oct 21 ] |
Fixed in:
|
Comment by SuNova [ 2019 Oct 21 ] |
I just noticed since I applied your commit to my own instance of Zabbix web interface, another problem is showing up, which I noticed is probably js related, as I'm not getting any errors in Apache error log: Uncaught TypeError: jQuery(...).textareaFlexible is not a function at HTMLDocument.<anonymous> (hosts.php?form=update&hostid=10318&groupid=65:646) at l (jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:4978) at c (jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:4978) There also is a warning which may be related: jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:4978 jQuery.Deferred exception: jQuery(...).textareaFlexible is not a function TypeError: jQuery(...).textareaFlexible is not a function at HTMLDocument.<anonymous> (https://zabbix.asr24.com/hosts.php?form=update&hostid=10318&groupid=65:646:23) at l (https://zabbix.asr24.com/jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:4978:29375) at c (https://zabbix.asr24.com/jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:4978:29677) undefined w.Deferred.exceptionHook @ jsLoader.php?ver=4.4.0&lang=en_GB&showGuiMessaging=1:4978 Symptoms seem to be disappearance of tabs in host and trigger configuration sections (items are not affected as I noticed). Also tab contents are merged together and one page containing all configuration fields is shown. cd /usr/share/zabbix/ cd js curl -o class.localstorage.js https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/frontends/php/js/class.localstorage.js?at=refs%2Fheads%2Ffeature%2FZBX-16605-4.0 cd .. curl -o jsLoader.php https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/frontends/php/jsLoader.php?at=refs%2Fheads%2Ffeature%2FZBX-16605-4.0 Screenshots are attached. And @Maks it's an honor to contribute to this awesome opensource and actively developed software |
Comment by SuNova [ 2019 Oct 21 ] |
I hate to be a goldfish, forgot to mention I restarted Apache after applying the patch to prevent possible issues. |
Comment by Miks Kronkalns [ 2019 Oct 21 ] |
SuNova, please make sure you have downloaded files from correct version of Zabbix. It looks like you are using 4.4 but jsLoader.php has been fetched from development branch which was made for 4.0. Btw, this fix is already included in latest release available in sourceforge. |
Comment by SuNova [ 2019 Oct 21 ] |
Sorry I haven't noticed about actual branch. It's fixed. Thanks for your help. |
Comment by Valdis Murzins [ 2019 Oct 23 ] |
I want to mention that in this task the cookie "localstoragePath" was removed, so it should no longer create problems with extra hardening in web server configuration. Although this hardrning should not be required, as all cookies in Zabbix have correct security options defined. |