-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe your context
dash 1.17.0
dash-core-components 1.13.0
dash-html-components 1.1.1
dash-renderer 1.8.3
Describe the bug
An error is raised when the devtools before request is not fully executed.
AttributeError: '_AppCtxGlobals' object has no attribute 'timing_information'
In our case this happens because we register our own "before request" to the flask instance, to handle user logins. Flask will not execute any other before_request_funcs
when a function returns something other than None. If an user is not logged in, we will throw a redirect to the login page.
So during the "before_request" phase the timing_information
is not set. During the "after_request" phase, it expects timing_information
was set. If not it will throw an error.
The error is caused by these lines: https://github.com/plotly/dash/blob/master/dash/dash.py#L1465-L1489
Expected behavior
It should check if the timing_information
is set, and not expect it is. If it is not it gracefully should handle the error.