You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Websocket connection initiated by front end even if not enabled in back end #3939
Describe your context
Websockt connections are created even if unused.
dash 4.4.0
Tested in Edge and Firefox.
Describe the bug
I am not sure if this is intended behaviour or a bug. The Dash front end attempts to established a WS connection even if websocket_callbacks=False is set in dash.Dash and no callbacks are set to use websockets.
Expected behavior
It would be preferable that no connection is attempted unless the app is configured to actually use websockets.
As a side note, changing the debug config and the way the uvicorn server is called seems to change exactly how these things are logged in the console too. For example (I am not certain yet what the trigger is), but sometimes the Websocket connected log comes from websocketObserver.ts (webpack://dash_renderer/src/observers/websocketObserver.ts) and other times from the dash renderer.
Activity
robertclaus commentedon Aug 3, 2026
@T4rk1n can you double check this? We should add tests for this if we didn't have them already.
@andredfb do you have an example app you used to test this?
andredfb commentedon Aug 3, 2026
Sorry, I should have specified earlier that I am using the
fastapibackend. You can reproduce it with a minimum example:This results in the following in the browser console:

And I am able to see the WS connection on the server side logs.
andredfb commentedon Aug 3, 2026
As a side note, changing the debug config and the way the uvicorn server is called seems to change exactly how these things are logged in the console too. For example (I am not certain yet what the trigger is), but sometimes the Websocket connected log comes from
websocketObserver.ts (webpack://dash_renderer/src/observers/websocketObserver.ts)and other times from the dash renderer.robertclaus commentedon Aug 4, 2026
Thanks @andredfb ! Those details made it easy for @T4rk1n to track down!