Calling getDashboardSrv().getCurrent() without calling getDashboardSrv().setCurrent() first Warning/Error

Hello,

I am using Grafana v8.0.3, and am trying to embed Iframes into a monitoring page, so that our DevOps employees can more easily see the state of the current kubernetes clusters.

We are adding the iframes via Iframe in ReactJS, and while all of the iframes that we are want are showing up, we are getting the following warning:
Calling getDashboardSrv().getCurrent() without calling getDashboardSrv().setCurrent() first.

I believe that this error is coming about from this line in Grafana’s code:

But I am still not understanding why this warning/error is coming about, and I would like to know why this is happening/how to fix it.

Any help is much appreciated, thanks!

Here is the full log in the web browser’s console:

DashboardSrv.ts:30 Calling getDashboardSrv().getCurrent() without calling getDashboardSrv().setCurrent() first.

getCurrent @ DashboardSrv.ts:30
(anonymous) @ queryAnalytics.ts:34
t._next @ tap.js:45
t.next @ Subscriber.js:53
t._next @ Subscriber.js:76
t.next @ Subscriber.js:53
t._next @ map.js:41
t.next @ Subscriber.js:53
t._next @ map.js:41
t.next @ Subscriber.js:53
(anonymous) @ subscribeToPromise.js:7
Promise.then (async)
t @ subscribeToPromise.js:5
e._trySubscribe @ Observable.js:43
e.subscribe @ Observable.js:29
e.call @ map.js:18
e.subscribe @ Observable.js:24
e.call @ map.js:18
e.subscribe @ Observable.js:24
e.call @ catchError.js:16
e.subscribe @ Observable.js:24
e.call @ tap.js:18
e.subscribe @ Observable.js:24
e.call @ finalize.js:13
e.subscribe @ Observable.js:24
t.connect @ ConnectableObservable.js:34
e.call @ refCount.js:19
e.subscribe @ Observable.js:24
c @ innerSubscribe.js:89
e.call @ takeUntil.js:13
e.subscribe @ Observable.js:24
c @ innerSubscribe.js:89
t._innerSub @ mergeMap.js:72
t._tryNext @ mergeMap.js:66
t._next @ mergeMap.js:49
t.next @ Subscriber.js:53
(anonymous) @ subscribeToArray.js:5
e._trySubscribe @ Observable.js:43
e.subscribe @ Observable.js:29
e.call @ mergeMap.js:27
e.subscribe @ Observable.js:24
e.call @ filter.js:15
e.subscribe @ Observable.js:24
e.call @ filter.js:15
e.subscribe @ Observable.js:24
e.call @ take.js:24
e.subscribe @ Observable.js:24
e.call @ throwIfEmpty.js:18
e.subscribe @ Observable.js:24
e.call @ mergeMap.js:27
e.subscribe @ Observable.js:24
e.call @ map.js:18
e.subscribe @ Observable.js:24
e.call @ map.js:18
e.subscribe @ Observable.js:24
e.call @ mergeMap.js:27
e.subscribe @ Observable.js:24
e.call @ takeUntil.js:16
e.subscribe @ Observable.js:24
e.call @ catchError.js:16
e.subscribe @ Observable.js:24
e.call @ finalize.js:13
e.subscribe @ Observable.js:24
onNewRequest @ VariableQueryRunner.ts:157
t.__tryOrUnsub @ Subscriber.js:192
t.next @ Subscriber.js:130
t._next @ Subscriber.js:76
t.next @ Subscriber.js:53
t.next @ Subject.js:47
queueRequest @ VariableQueryRunner.ts:73
(anonymous) @ actions.ts:40
(anonymous) @ actions.ts:34
async function (async)
(anonymous) @ actions.ts:30
(anonymous) @ index.js:8
o @ store.ts:27
updateOptions @ adapter.ts:33
(anonymous) @ actions.ts:677
async function (async)
(anonymous) @ actions.ts:676
(anonymous) @ index.js:8
dispatch @ redux.js:638
(anonymous) @ actions.ts:286
async function (async)
(anonymous) @ actions.ts:271
(anonymous) @ index.js:8
dispatch @ redux.js:638
(anonymous) @ actions.ts:300
(anonymous) @ actions.ts:299
(anonymous) @ index.js:8
dispatch @ redux.js:638
(anonymous) @ actions.ts:645
(anonymous) @ index.js:8
dispatch @ redux.js:638
(anonymous) @ initDashboard.ts:164
async function (async)
(anonymous) @ initDashboard.ts:121
(anonymous) @ index.js:8
(anonymous) @ redux.js:477
componentDidMount @ SoloPanelPage.tsx:39
du @ react-dom.production.min.js:219
Ss @ react-dom.production.min.js:259
t.unstable_runWithPriority @ scheduler.production.min.js:18
Ho @ react-dom.production.min.js:122
Es @ react-dom.production.min.js:252
ds @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:18
Ho @ react-dom.production.min.js:122
qo @ react-dom.production.min.js:123
Wo @ react-dom.production.min.js:122
us @ react-dom.production.min.js:237
enqueueSetState @ react-dom.production.min.js:133
g.setState @ react.production.min.js:12
t @ index.js:205
(anonymous) @ index.js:215
Promise.then (async)
n._loadModule @ index.js:214
n.componentWillMount @ index.js:168
yi @ react-dom.production.min.js:138
za @ react-dom.production.min.js:181
Uu @ react-dom.production.min.js:269
Os @ react-dom.production.min.js:250
_s @ react-dom.production.min.js:250
ws @ react-dom.production.min.js:250
ds @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:18
Ho @ react-dom.production.min.js:122
qo @ react-dom.production.min.js:123
Wo @ react-dom.production.min.js:122
hs @ react-dom.production.min.js:244
Qs @ react-dom.production.min.js:289
t.render @ react-dom.production.min.js:296
(anonymous) @ app.ts:111
Promise.then (async)
init @ app.ts:110
zl43 @ index.ts:20
o @ bootstrap:84
r @ bootstrap:45
t @ bootstrap:32
(anonymous) @ vendors~app.90f320b….js:2