marcusolsson / grafana-gantt-panel

A panel plugin for Grafana to visualize Gantt charts.
Apache License 2.0
26 stars 12 forks source link

getting "Cannot read property 'visualization' of undefined" after upgrade to grafana 8.0 #38

Closed vipin5050 closed 3 years ago

vipin5050 commented 3 years ago

Not sure if it related to upgrade but I noticed after upgrading to grafana 8.0 I am getting "Cannot read property 'visualization' of undefined, grafana"

Screen Shot 2021-06-13 at 9 47 47 AM
marcusolsson commented 3 years ago

Hi, and thanks for reporting this. I'm unfortunately not able to reproduce this. The plugin also doesn't have any property called visualization, which leads me to be believe this might be a Grafana bug. Does this happen for only the Gantt panel?

marcusolsson commented 3 years ago

Is there any way you could give me a (anonymized) dashboard JSON that reproduces this issue?

vipin5050 commented 3 years ago

Hi @marcusolsson yes this happened only with gantt chart and after I saw this error with grafana 8.0.1, I downgraded to grafana 7.8.1 and it worked without any issue.

vipin5050 commented 3 years ago

Is there any way you could give me a (anonymized) dashboard JSON that reproduces this issue?

let me know where I can send you JSON

marcusolsson commented 3 years ago

Could you create a Gist maybe?

vipin5050 commented 3 years ago

https://gist.github.com/vipin5050/43d4b38301616468b876afc542658f69#file-gistfile1-txt

let me know if you can see it

marcusolsson commented 3 years ago

Thank you, I'll take a look at it! Also, could you open the Developer Tools in your browser and check the Console tab and see if there's a stack trace with more information?

I've published a new version (0.7.1) with some minor fixes. I don't think there's anything in there that would affect this, but could you check the new version to confirm?

PhilippDehner commented 3 years ago

I also got the error (compare https://github.com/marcusolsson/grafana-gantt-panel/discussions/41)

Here is the log from the browser:

TypeError: t is undefined
    getCalculator fieldColor.ts:38
    x scale.ts:37
    S displayProcessor.ts:104
    GanttChart GanttChart.tsx:321
    GanttChart GanttChart.tsx:299
    React 7
        na
        Uu
        Os
        _s
        ws
        ds
        qo
    unstable_runWithPriority scheduler.production.min.js:18
    React 13
        Ho
        qo
        Wo
        Re
        $t
        jr
        Ar
        Cr
        Cr
        Xs
        _reactRootContainer
        Qs
        render
    init app.ts:111
    promise callback*init app.ts:110
    zl43 index.ts:20
    Webpack 4
        o
        r
        t
        <anonymous>
react-dom.production.min.js:216:191
    React 5
        iu
        callback
        li
        du
        Ss
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
        Ho
        Es
        ds
        qo
    unstable_runWithPriority scheduler.production.min.js:18
    React 13
        Ho
        qo
        Wo
        Re
        $t
        jr
        Ar
        Cr
        Cr
        Xs
        _reactRootContainer
        Qs
        render
    init app.ts:111
    (Async: promise callback)
    init app.ts:110
    zl43 index.ts:20
    Webpack 4
        o
        r
        t
        <anonym>
marcusolsson commented 3 years ago

I've been testing this on Grafana 8.0.0, 8.0.1, and 8.0.2, with the latest version of the plugin (0.7.1), on a macOS 11.2.3, on Firefox, Safari, and Chrome, and fail to replicate this issue. Could you perhaps share your environment details?

Is there any specific configuration that produces the error, or does the error occur with default settings?

PhilippDehner commented 3 years ago

I'm working on

Do you need some more information? (Query, etc)

By the way: I tried it with grafana version 7.5.7 With this version it worked.

PhilippDehner commented 3 years ago

Is it always neccessary to format the data to table format instead of time series? If so, it would be good to have that in the ReadMe

vipin5050 commented 3 years ago

I'm working on

  • windows 10
  • grafana 8.0.1
  • gantt plugin 0.7.1
  • firefox 89.0

Do you need some more information? (Query, etc)

By the way: I tried it with grafana version 7.5.7 With this version it worked.

Hi @trophi20 so it worked with grafana 7.5.7 but does not work with grafana 8.0.1? same here same setup worked with grafana 7.5.7 but does not work with 8.0.1

marcusolsson commented 3 years ago

I think I found the problem. Could you try 0.7.2 and let me know if the issue's still there?

vipin5050 commented 3 years ago

Hi @marcusolsson I tried again with 0.7.2 and grafana 8.0.1, issue is still there. the moment I downgrade grafana to 7.5.1 it worked.

PhilippDehner commented 3 years ago

I took the 0.7.2 from github and builded it. I used grafana 8.0.1, but it is still not working: TypeError: t is undefined getCalculator fieldColor.ts:38 x scale.ts:37 S displayProcessor.ts:104 GanttChart GanttChart.tsx:321 GanttChart GanttChart.tsx:299 React 7 na Uu Os _s ws ds qo unstable_runWithPriority scheduler.production.min.js:18 React 6 Ho qo Wo us enqueueSetState setState onDataUpdate PanelChrome.tsx:221 next PanelChrome.tsx:127 RxJS 19 __tryOrUnsub next _next next _next next notifyNext _next next r _trySubscribe subscribe c _innerSub _tryNext _next next next nextInfiniteTimeWindow next PanelQueryRunner.ts:268 RxJS 48 __tryOrUnsub next _next next notifyNext _next next _next next next _next next _next next _next next _next next _next next _next next _next next _next next _next next _next next _next next notifyNext _next next _next next _next next _next next next _next next notifyNext _next next l react-dom.production.min.js:216:191

vipin5050 commented 3 years ago

@marcusolsson any update, do you need any more information?

marcusolsson commented 3 years ago

I'm a bit stumped here tbh. I know what the problem is—the theme is not being set—but I can't seem to find where 😅 Also I'm still not able to reproduce this so it's hard to debug. The only difference between our setups is that you're both running on Windows 10. I'll try to find a Windows machine to test this on next week.

vipin5050 commented 3 years ago

I'm a bit stumped here tbh. I know what the problem is—the theme is not being set—but I can't seem to find where 😅 Also I'm still not able to reproduce this so it's hard to debug. The only difference between our setups is that you're both running on Windows 10. I'll try to find a Windows machine to test this on next week.

I am running on linux, if you want I can work online witn you and show the issue firsthand. could it be because starting grafana 8 you have to explicitly allow plugin to load if its not signed, just a guess.

jeje8365 commented 3 years ago

Hi ! I have the same problem on my Grafana. I put my data here if it can help you.

Version of Grafana : 8.0.2 Version of plugin : 0.7.2 Datasource : Elasticsearch Query : See below Transform : Filter by name to remove "Count"

image

I see different error depending on the setup:

If it helps, I can provide the log for each browser.

Interessant point : The same query+transform used on your "Calendar" extension and it works fine. Sadly, I migrated directly from Grafana 7.0 to 8.0, so I can't tell if the plugin worked with a 7.3+ with my setup... In fact, I migrated to Grafana 8.0 to be able to use this plugin :-) !

I hope it will help.

Many thanks for all your work !

benganellison commented 3 years ago

I have the same issue, running mac as client, linux as host, elasticsearch as data source. Works in 7.3 but not in 8.0

marcusolsson commented 3 years ago

Hope to get a chance to look at this during the weekend. Will set up a dual boot PC so that I can test on other configurations. Thanks for your patience! 🙏

vipin5050 commented 3 years ago

@marcusolsson I am eagerly waiting for fix :-), let me know if I can help in testing on weekend, I in PST timezone.

vipin5050 commented 3 years ago

Hi @marcusolsson did you get a chance to look in to the issue over the weekend?

TanyaTarasovaTT commented 3 years ago

@marcusolsson Thank you a lot for your Gantt Panel. I also have the same issue. Looking forward for the fix.

TanyaTarasovaTT commented 3 years ago

Jfyi I added only one gantt panel and see these errors: image The first two errors also present with other panels and they work. I noticed the same error about 'visualization' with another panel: Waterfall. However, after pressing F5 it works ok, but Gantt keeps showing the same error.

vipin5050 commented 3 years ago

@marcusolsson any update on the fix, will appreciate if could take a look in fixing this issue, our upgrade of grafana is stuck.

marcusolsson commented 3 years ago

Sorry for the lack of updates on this, I've been on vacation for the past few weeks. I'll start looking into this tomorrow!

marcusolsson commented 3 years ago

While I still haven't been able to reproduce this myself, I think I know what the issue is. I've published v0.7.3 with (hopefully) a fix. Could you try it out and let me know if that fixes the issue for you?

vipin5050 commented 3 years ago

Thanks @marcusolsson its working, after upgrading to latest release issue is no more and I upgraded grafana to 8.1.0 too. Thanks for your support. BTW what was the issue?

TanyaTarasovaTT commented 3 years ago

@marcusolsson thank you for the update! I will check and inform you later. Currently, I see that the behavior is different, however, seems to have some problems with my own query. I will get back to you about the final results.

marcusolsson commented 3 years ago

BTW what was the issue?

I fixed the issue in a support library by adding an optional (for backwards-compatibility) argument to a helper that converts the start and end to time fields if they are string or number fields. I updated the dependency, but forgot to actually pass a value to the added argument. It didn't complain because it was optional.

I guess I just needed some time off to spot it 😅