Nagvis - Aggregation Objects not working, "_bi" backend crashes when selected

Hello,

I’m having trouble with Nagvis. I’m trying to place a BI Aggregation for the first time onto a Nagvis map. My Check_MK site generates a crash when I select the “_bi” backend as source. I tried to troubleshoot it by clearing out all BI Aggregations (because the error message said it got an invalid result) and creating just one new BI Aggregation containing two ports for testing. But whatever I do, it always crashes when I select the “_bi” backend in Nagvis, and it doesn’t show any Aggregations in the Drop Down Menu.

The Site is really old. It started as Checkmk 1.4 and got upgraded/migrated over the course of many years. Maybe there is a configuration file that didn’t upgrade properly?

Thank you all for any hints or help on how to resolve this.

CMK version:2.1.0p9.cre
OS version:Ubuntu 20.04.4 LTS

Error message:
Failed to get objects: Ungültige Antwort (snm_bi): ERROR: Internal error: Painter 'aggr_treestate' returned invalid result: ('', {'title': 'xg01int005-dv111int012', 'in_downtime': False, 'acknowledged': False, 'in_service_period': True, 'assumed': False, 'state': 0, 'output': ''}) An internal error occured while processing your request. You can report this issue to the Checkmk team to help fixing this issue. Please open the crash report page and use the form for reporting the problem.

I’ve the same problem also in the newest version 2.1.0p11.cee
I figured out that removing (or uncommenting) line 2323 in
“/omd/versions/2.1.0p11.cee/lib/python3/cmk/gui/plugins/views/utils.py” solves the problem
( see code snippet below)

    def render_content(self, row: Row) -> CellSpec:
        if not row:
            return "", ""  # nothing to paint

        painter = self.painter()
        result = painter.render(row, self)
        if (
            not isinstance(result, tuple)
            or len(result) != 2
            or not isinstance(result[1], (str, HTML))
        ):
            output_formats: List[str] = [
                "csv_export",
                "csv",
                "json_export",
                "json",
            ]
            if (
                request.var("output_format") in output_formats
                and isinstance(
                    painter,
                    (
                        cmk.gui.plugins.views.painters.PainterHostLabels,
                        cmk.gui.plugins.views.painters.PainterServiceLabels,
                    ),
                )
                and isinstance(result[1], dict)
            ):
                return result
### I don't understand this Execption here ... removing it solves the problem!
###               raise Exception(_("Painter %r returned invalid result: %r") % (painter.ident, result))
        return result

Thank you, I’ve just tried it out and it works.