Dash 4.2: Websockets not working in Domino Data Lab [Fix included]

Hi,

first of all, Dash 4.2 is an amazing progress - well done.

However, I tried using websockets. It works perfectly fine locally, however they do not work at all withing a Domino Data Lab (azure hosted) environment for me.

Specifically, I tried to run the IOT Demo app. The app loads completely, but DevTools immediately outputs in the console the error: “[Dash] WebSocket disconnected: Connection closed”. There is no connect message before.

I tied the only meaningful thing in 2026 and ran Copilot on it and the issue was found:
#.venv/lib/python3.13/site-packages/dash/backends/_fastapi.py

Line 673:

ws_path = dash_app.config.requests_pathname_prefix + "_dash-ws-callback"

should be:

ws_path = dash_app.config.routes_pathname_prefix + "_dash-ws-callback"

I would post on github directly, but my company unfortunately blocks it completely. So this is the second best option I guess.