Connection Error: Failed to process a WebSocket message

I have multiple Streamlit applications running behind a proxy. I did not have any problem until version 1.11.

Occasionally, when I am interacting with the streamlit, I get the following error message:

Connection Error
Failed to process a Websocket message (Error: Failed to retrieve ForwardMsg (hash=): Bad Request)

When I refresh the page, the error is gone temporarily, but it will show up again.

My proxy is handling /stream using websocket, and I did not have any issue previously.

When I downgrade the streamlit, the error is gone.

The main issue is related to:
http://127.0.0.1:8501/message?hash=412f0d28377fb1a3491242bf72feb4a5
which is not accessible.

Hi @kaveh ,

What streamlit version did u have before and what do you currently have right now? It seems like we have been doing some work with the WebSocket connections so it’s possible a bug was introduced at 1.11 or 1.11.1.

Thanks for posting the issue and hope to hear back.

Thanks,

William

Hi @willhuang

I was using Streamlit 1.9 without any issue. Once I upgraded to 1.11.1 for the vulnerability issue, I saw these errors. I even tried disabling CORS, XSRF, and WebSocketCompression but none of them worked. So I downgraded it back to 1.9 to make sure that it is still running without issues. I did not test it with 1.10.

I have many sliders in my app, and it usually happens when I am playing with the sliders. Once it happened, I checked the URL of /message?hash=... and it returned Error 404, and as of streamlit source code, if the hash code does not exist, the Message handler returns 404.

Thanks,

Kaveh

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.