Getting TypeError when using page_container from pages

Hi, I’m trying to have use_pages=True, and then registering pages however I keep getting the error at the bottom on the app startup?

It doesn’t cause any issues so can just ignore but wondered why it would be showing up?

here is my basic layout code:

app.layout = dmc.MantineProvider(
    dmc.MantineProvider(
        inherit=True,
            "headings": {
                "fontFamily": "customFont",
            },
            "fontFamily": "customFont",
            "fontFamilyMonospace": "customFont",
        },
        id="mantine_theme",
        children=[
            dcc.Store(id="theme-store", storage_type="local"),
            dmc.Button(id="theme-changed", style={"display": "none"}),
            dcc.Location(id="url"),
            dmc.NotificationsProvider(
                [
                    create_header(),
                    create_sidebar(),
                    html.Div(
                        dmc.Container(size="lg", pt=90, children=page_container),
                        id="wrapper",
                    ),
                ]
            ),
        ],
    ),
    theme={"colorScheme": "light"},
    id="mantine-theme-provider",
    withGlobalStyles=True,
    withNormalizeCSS=True,
)

TypeError: Cannot read properties of undefined (reading 'apply')

    at _callee3$ (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:580:74)

    at tryCatch (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:411:2404)

    at Generator._invoke (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:411:1964)

    at Generator.next (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:411:3255)

    at asyncGeneratorStep (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:415:103)

    at _next (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:416:194)

    at http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:416:364

    at new Promise (<anonymous>)

    at http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:416:97

    at handleClientside (http://127.0.0.1:8050/_dash-component-suites/dash/dash-renderer/build/dash_renderer.v2_9_2m1680686477.dev.js:532:28)

Looks like its a clientside_error on pages_dummy? How can I go about fixing this

Hi @RConvex

This looks related to issue #2488 which will be fixed in the next release.
Does the error go away if you refresh the page?

thanks! yeah it does

1 Like