Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'isZabbix54OrHigher' of undefined when creating a variable template query #1282

Closed
mjtrangoni opened this issue Aug 30, 2021 · 4 comments

Comments

@mjtrangoni
Copy link
Contributor

Describe the bug
Having other datasources configured in parallel to Zabbix, and trying to create a Template variable for that other datasource results in a Grafana crash which "unexpected error happened".

I would say this needs to be fixed ASAP as it is affecting other plugins as well.

Expected behavior
I expect to create a Template Variable for other plugins when having the Zabbix Plugin enabled.

Screenshots

An unexpected error happened
DetailsTypeError: Cannot read property 'isZabbix54OrHigher' of undefined

    at t (https://grafana.xxx/public/plugins/alexanderzobnin-zabbix-app/datasource-zabbix/module.js:1:122220)
    at div
    at div
    at div
    at u (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:232396)
    at h (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:233106)
    at div
    at div
    at u (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:232396)
    at h (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:233106)
    at div
    at div
    at u (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:232396)
    at h (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:233106)
    at _ (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:747:6621)
    at E (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:73696)
    at div
    at div
    at u (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:232396)
    at h (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4694:233106)
    at form
    at div
    at Y (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:266:4329)
    at E (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:73696)
    at div
    at Ne (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:288:1831)
    at E (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:73696)
    at div
    at div
    at div
    at div
    at div
    at t (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:852951)
    at h (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:5755:36473)
    at div
    at mn (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:301:189)
    at div
    at E (https://grafana.xxx/public/build/DashboardPage.8ea303538f79ee32b68a.js:432:994)
    at DashboardPage
    at E (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:73696)
    at n (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:545060)
    at si (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:5946:3239)
    at t (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:1380749)
    at t (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:1382794)
    at main
    at t (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:1377354)
    at div
    at da (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:3492:1227)
    at h (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:5753:20211)
    at pl (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4169:682)
    at hl (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:4169:972)
    at l (https://grafana.xxx/public/build/vendors~app.8ea303538f79ee32b68a.js:2:71604)
    at Ni (https://grafana.xxx/public/build/app.8ea303538f79ee32b68a.js:5959:421)

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
8.1.2 5.0.11 4.2.2
@alexanderzobnin
Copy link
Collaborator

Confirmed.

@alexanderzobnin
Copy link
Collaborator

alexanderzobnin commented Aug 31, 2021

That's pretty strange. Issue happens when you switch variable editor from zabbix data source to another. It may happen if you have zabbix data source enabled as a default. When data source switched, for some reason Grafana tries to render zabbix variable query editor, but passes the new data source as a param. As a result, error happens, since another data source does not have zabbix property.

As a workaround, I can suggest to uncheck default flag on Zabbix data source to prevent zabbix variable editor loading when you create a new variable.

@mjtrangoni
Copy link
Contributor Author

@alexanderzobnin thank you! Do you have an ETA for the next minor release?

@alexanderzobnin
Copy link
Collaborator

I'm not 100% sure, but it should not be late than end of Sep.

@alexanderzobnin alexanderzobnin changed the title CRITICAL: Cannot read property 'isZabbix54OrHigher' of undefined when creating a variable template query Cannot read property 'isZabbix54OrHigher' of undefined when creating a variable template query Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants