Open Jonas1302 opened 12 months ago
Furthermore (I'm not sure if it is the same bug), if I return a tuple as layout of page B (by simply adding a ,
at the end), I get a similar error but the error message contains the information about the page:
Error: An object was provided as `children` instead of a component, string, or number (or list of those). Check the children property that looks something like:
{
"0": {
"props": {
"children": [
{
"props": {
"children": "Page B"
},
"type": "H1",
"namespace": "dash_html_components"
},
{
"props": {
"children": "Change page",
"href": "/a"
},
"type": "Link",
"namespace": "dash_core_components"
},
{
"props": {
"children": [
{
"props": {
"children": null,
"id": "element-B-1"
},
"type": "P",
"namespace": "dash_html_components"
},
{
"props": {
"children": null,
"id": "element-B-2"
},
"type": "P",
"namespace": "dash_html_components"
}
]
},
"type": "Row",
"namespace": "dash_bootstrap_components"
},
{
"props": {
"children": null,
"id": "progress-output-B"
},
"type": "Div",
"namespace": "dash_html_components"
}
]
},
"type": "Div",
"namespace": "dash_html_components"
},
"props": {
"children": [
null,
null,
{
"props": {
"children": "step A2"
}
}
]
}
}
Describe your context
Describe the bug
I'm using a multipage app with background callbacks and the progress feature. In some cases, changing the page while a background callback is still running, leads to an error in the browser console:
Followed by (sometimes multiple)
Uncaught (in promise) Error: undefined was not found.
(or similar).The page will no longer be updated by any callbacks and I can no longer go to another dash page by clicking on a link (the URL changes but nothing else happens). After refreshing the page (F5) everything is back to normal.
It seems that sometimes (but not always), the URL changes back to the old page (maybe has something to do with #2650?).
Expected behavior
No error should occur and the callbacks of the new page should be executed.
Steps to reproduce (using the MWE from below)
If you wait until all callbacks on page A are done, there shouldn't be any error.
Weirdly, if you change the layout of page B slightly, the error is gone too. Each of the following changes will get rid of the error: a) remove the
dbc.Row
and place thehtml.P
as immediate children of the div b) move theprogress-output-B
above thedbc.Row
c) remove the twoset_progress
calls ina.py
MWE
app.py
a.py
b.py