Dashboard suddenly fails with TypeError: can't access property "toString", this.state.text is undefined

I’ve got a long time installation of Grafana, with a dashboard I’ve made more than 5 years ago. Everything was fine, I updated Grafana regularly, as dashboard.

Then, I’ve got this error:

TypeError: can't access property "toString", this.state.text is undefined

Partial stack trace from browser console:

TypeError: can't access property "toString", this.state.text is undefined
    getValueText LocalValueVariable.js:36
    formatter formatRegistry.js:274
    m sceneInterpolator.js:83
    h sceneInterpolator.js:24
    h sceneInterpolator.js:14
    A sceneGraph.js:31
    be utils.ts:429
    ce RowItemRenderer.tsx:43
    zo react-dom-client.production.js:4351

Indeed, after debugging, state object has no text property, but I don’t know how to update my dashboard to fix this :frowning:

The stack trace points to LocalValueVariable.js, so this looks related to a dashboard variable rather than a panel.

Could you provide:
Grafana version are you running now, and which version did you upgrade from?
The dashboard JSON (or at least the templating section)?

Does the error occur immediately when opening the dashboard, or only after selecting/changing a variable?

(Thanks for the very quick reply!)

So: Grafana v13.1.0 (b309c9bb3b)

Indeed, I’ve got some variables, automatically set to var-fund=fund-8011&var-fund=fund-8891&var-fund=fund-8564 (yes, it’s a finance dashboard). After playing around, I’ve been able to restore it. But I needed to:

  • Remove all vars but one;
  • Selectively add them back
  • In another order, for no particular reason

No it’s back, I will say that’s OK for me, except if you want some debug I can provide :slight_smile: