grafana/influxdb-flux-datasource

TypeError: Cannot mix BigInt and other types, use explicit conversions

dracan opened this issue · 6 comments

Just trying out InfluxDB with a simple example graphing todo-list task counts, which works fine in InfluxDB Data Explorer, but in Grafana it throws the following exception in Chrome devtools...

Uncaught (in promise) TypeError: Cannot mix BigInt and other types, use explicit conversions
    at e.value (time_series2.ts:301)
    at e.value (graph.ts:457)
    at e.value (graph.ts:107)
    at s.emit (index.js:202)
    at e.value (emitter.ts:27)
    at t.value (panel_ctrl.ts:102)
    at module.ts:240

The query is this...

from(bucket: "Todoist")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "NumberOfTodos")
  |> filter(fn: (r) => r["_field"] == "value")

Which was literally copied straight from the auto-generated query in InfluxDB Data Explorer.

The data is extremely simple - just a list of numbers pulled from Todoist once per hour. The numbers are around the 500 mark - so not huge at all...

image

In Grafana...

image

Note that a smaller time frame getting just the last one or two hours does work. Also, a longer time frame when I only had a few hour's worth of data in the database also worked. Now I have 24 hours of data (only one data point per hour), it breaks.

Are you able to test with a nightly build of grafana?

This plugin is getting moved into core, and I think this issue is solved in the master build. Try any recent:
https://grafana.com/grafana/download

or the master branch on docker

I've just tried running the Grafana docker image with the master tag - ie. docker run --name=grafana -p 3000:3000 grafana/grafana:master. This doesn't seem to have the Flux datasource included by default. Is that what you meant by 'moved into core'?

I've just tried running the Grafana docker image with the master tag - ie. docker run --name=grafana -p 3000:3000 grafana/grafana:master. This doesn't seem to have the Flux datasource included by default. Is that what you meant by 'moved into core'?

In the current master support for Flux queries is in the core InfluxDB data source, you can switch between InfluxQL and Flux when you configure the data source. I'm using it against InfluxDB 2 and it is working ok, the editing experience is fairly poor compared to this plugin though.

@dracan do you see something like this:
image

Awesome, this works perfectly! :) I'm using hosted Grafana - any ideas what this is likely to appear there?

any ideas what this is likely to appear there?

In about 1 more week. 7.1 is in beta and will be released next week