Initial Layout fails to Load with "TypeError: Cannot read property `0` of undefined"

Hi all,
I am having problems with my application. Recently the app’s initial layout started failing to load without any error message in the logs. The only thing I have to go off of are the two error messages I get in Chrome’s developer pane:

react-dom@16.v1_8_0m1599659278.13.0.min.js:125 TypeError: Cannot read property '0' of undefined
    at e.getWeight (type.ts:15)
    at EdgeFactory.tsx:124
    at forEach.js:47
    at _checkForMethod.js:22
    at Object.t [as a] (_curry2.js:28)
    at e.value (EdgeFactory.tsx:124)
    at EdgeFactory.tsx:45
    at e.memoizedCreateEdges (memoizer.ts:7)
    at e.value (EdgeFactory.tsx:141)
    at i.tableFn (index.tsx:34)

dash_renderer.v1_8_0m1599659278.min.js:20 TypeError: Cannot read property '0' of undefined
    at e.getWeight (type.ts:15)
    at EdgeFactory.tsx:124
    at forEach.js:47
    at _checkForMethod.js:22
    at Object.t [as a] (_curry2.js:28)
    at e.value (EdgeFactory.tsx:124)
    at EdgeFactory.tsx:45
    at e.memoizedCreateEdges (memoizer.ts:7)
    at e.value (EdgeFactory.tsx:141)
    at i.tableFn (index.tsx:34)

Now, to be honest, seeing this I am not even able to tell where to start debugging as I don’t get any hints as to which element is undefined.
The only “hint” I have is that the two tabs I defined like so:

session_id = str(uuid.uuid4())

    layout = html.Div(
        [
            html.Div(session_id, id="session-id", style={"display": "none"}),
            intro_div,
            navbar,
            dbc.Tabs(
                id="sections",
                children=[
                    dbc.Tab(exec_dashboard, tab_id="exec", label="Executive View"),
                    dbc.Tab(body, tab_id="ddive", label="Deep Dive"),
                ],
            ),
        ]
    )

load fine (i.e. the user can choose either of them and thus trigger an update of the layout upon which it loads normally). The tabs however start out empty.

I know this is a really bad question - no reproducible example etc. - and I’m not looking for a complete answer, but any pointer into what might be the problem - or how I might be able to identify the problematic elements - is highly appreciated.

Thanks in advance

1 Like

Hello!
Your code looks fine to me, but the problem might be with the children of your Tab elements? What are they and where are they defined?