Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Annotation Query Failed Cannot read property 'to' of undefined #219

Closed
Sinketsu opened this issue Aug 12, 2021 · 13 comments · Fixed by #230
Closed

Annotation Query Failed Cannot read property 'to' of undefined #219

Sinketsu opened this issue Aug 12, 2021 · 13 comments · Fixed by #230
Labels
bug Something isn't working
Milestone

Comments

@Sinketsu
Copy link

What happened:
When dashboard refresh, an error occurs.
Annotation Query Failed
Cannot read property 'to' of undefined

In console:

AnnotationSrv.query error TypeError: Cannot read property 'to' of undefined
at Module.j (rangeutil.ts:269)
at y (annotations_srv.ts:236)
at annotations_srv.ts:157
at async Promise.all (/d/RHTucjGnz/index 0)
at async Promise.all (/d/RHTucjGnz/index 0)

And the annotations are not drawn.

What you expected to happen:

Draw annotations on a panel.

How to reproduce it (as minimally and precisely as possible):

Install Grafana v8.1.1 (90c87a52f7) with flant-statusmap-panel 0.4.1

Environment:

  • Grafana version: v8.1.1 (90c87a52f7)
  • flant-statusmap-panel version: 0.4.1
  • Data source type & version:
  • OS Grafana is installed on:
  • User OS & Browser: Yandex browser 21.6.0.1108
  • Grafana plugins:
  • Others:

Anything else we should know?:
image

@Sinketsu Sinketsu added the bug Something isn't working label Aug 12, 2021
@melroy89
Copy link

melroy89 commented Aug 16, 2021

Please fix!

AnnotationSrv.query error TypeError: e is undefined
    j https://stats.melroy.org/public/build/app.843e85298b12060ea650.js:5798
    y https://stats.melroy.org/public/build/app.843e85298b12060ea650.js:4717
    getGlobalAnnotations https://stats.melroy.org/public/build/app.843e85298b12060ea650.js:4717
app.843e85298b12060ea650.js:4717:9600
    getAnnotations https://stats.melroy.org/public/build/app.843e85298b12060ea650.js:4717

image

@Cjkeenan
Copy link

Cjkeenan commented Sep 6, 2021

It looks like there might be a related issue here grafana/grafana#37819, could go over there to chime in with any additional info.

@roastiek
Copy link

The range parameter is undefiened in 8.1.x when calling getAnnotations for the first time. But on the next call (refresh), the range has already a value.

Just added simple console.log(this.range) before getAnnotations.

issueQueries(datasource: any) {
this.annotationsPromise = this.annotationsSrv.getAnnotations({
dashboard: this.dashboard,
panel: this.panel,
range: this.range,
});

@roastiek
Copy link

I'm suspecting this commit grafana/grafana@6f38883.

The updateTimeRange is no longer called before issueQueries so this.range is not set until super.issueQueries is called.

Adding this.updateTimeRange(datasource); before using this.range fix this for me.

@melroy89
Copy link

melroy89 commented Oct 7, 2021

See also: grafana/grafana#37819 , plz fix.

@GreenRover
Copy link

+1

@leonidgorbachev
Copy link

+1
Could you please share your thoughts, when we can expect the fix for statusmap?

@staeglis
Copy link

+1

@shurup
Copy link
Contributor

shurup commented Oct 28, 2021

Hi everyone and sorry for the delay with fixing this issue. We're going to deal with it at the beginning of the following week.

@melroy89
Copy link

melroy89 commented Nov 2, 2021

Looking forward for the fix anytime soon! 👍🏽

@KannappanSomu
Copy link

+1

@diafour
Copy link
Collaborator

diafour commented Nov 3, 2021

I've merged a fix. Need to cut a release.

@melroy89
Copy link

melroy89 commented Nov 9, 2021

I can't wait 🍰

@diafour diafour modified the milestones: 0.5.0, 0.4.2 Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants