CorpGlory / grafana-data-exporter

Server for fetching data from Grafana datasources
39 stars 6 forks source link

UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined #36

Open vishwakhrushi opened 3 years ago

vishwakhrushi commented 3 years ago

I noticed the Grafana-data-exporter failing to pull the data, below are the details for the components I'm using.

Grafana-exporter-version: v0.5.1 Grafana-version: v7.1.5 datasource: Prometheus

Below is the error log grafana-data-exporter

0 day: 1611858600000ms -> 1611945000000ms
│ (node:25) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined │ at /var/www/dist/server.js:59057:44
│ at Array.map ()
│ at PrometheusMetric.getResults (/var/www/dist/server.js:59053:20)
│ at Object. (/var/www/dist/server.js:32429:44)
│ at Generator.next ()
│ at fulfilled (/var/www/dist/server.js:32376:58)
│ at runMicrotasks ()
│ at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:25) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6) (node:25) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'm stuck, any help is appreciated.