Open jamessanford opened 7 months ago
hi @jamessanford can you share the grafana server error logs?
thank you
@tonypowa The failure to display the list of dashboards was caused by old entries in the dashboard
table in grafana.db
. Removing the rows with delete from dashboard where uid is NULL;
for the old rows fixed the bug. The recursion bug causing the list of dashboards to not display was introduced between 10.2.3 (? some possibility it was a little earlier) and 10.3.1.
The old rows stood out because they had an empty uid
field in the code where the recursion bug was happening. The old rows are from 2018 and grafana 4.6.3, and the next grafana upgrade was to 5.4.2.
The function called recursively appears to be createFlatTree
/ mapItem
in https://github.com/grafana/grafana/blob/8014665ab55955984a7cebc0b47a12d32f37c666/public/app/features/browse-dashboards/state/hooks.ts#L142
The old dashboard rows were like the following, note there was an empty uid
field.
{
"kind": "dashboard",
"uid": "",
"title": "MTR Test",
"url": "/graph/d//mtr-test",
"tags": [],
"parentTitle": "General",
"parentKind": "folder"
},
The old rows in database
table in grafana.db
looked like this (data
field omitted)
sqlite> SELECT id,version,slug,title,org_id,created,updated_by,created_by,gnet_id,plugin_id,folder_id,is_folder,has_acl,uid,is_public,folder_uid FROM dashboard WHERE uid is NULL;
27|4|timescaledb-test|TimescaleDB Test|1|2018-04-07 22:49:48|6|6|0||0|0|0||0|
28|3|smart-status|SMART Status|1|2018-06-02 23:26:48|6|6|0||0|0|0||0|
29|2|mtr-test|MTR Test|1|2018-07-06 02:30:03|6|6|0||0|0|0||0|
many thanks for sharing the solution @jamessanford ! I will forward this issue to the Dashboard squad
What happened?
/dashboards
DashboardListPage returns error: "Page error", "An unexpected error happened", "InternalError: too much recursion"What did you expect to happen?
Expected the list of available dashboards to be displayed
Did this work before?
This worked as of version 10.2.3. 10.3.1 and 10.4.0 both fail.
How do we reproduce it?
example.com/graph/
example.com/graph/dashboards
Is the bug inside a dashboard panel?
No response
Environment (with versions)?
Grafana: 10.4.0 OS: ArchLinux Browser: Firefox
Grafana platform?
A package manager (APT, YUM, BREW, etc.)
Datasource(s)?
No response