Random streamlit app crashes with error Failed to process a Websocket message (AxiosError: Request failed with status code 404)

Running my Streamlit application (1.39) in snowflake and it is crashing on a fairly frequent basis with the error:
Failed to process a Websocket message (AxiosError: Request failed with status code 404)

It can happen on any page, at any point in the navigation, and it doesn’t seem to be related to any code or logic on any specific page. After the crash, I have to hit refresh, or back to leave the app, and then reenter the application.

Is anyone else encountering this?

3 Likes

Yes, facing the same issue.

yes, I’m also facing same issue. Any solution for this?

same issue.

Same issue here Connection error

Failed to process a Websocket message (AxiosError: Request failed with status code 404)

Any solutions shared?

Hi, I have the same problem.
The error is caused by an HTTP request, whose path is “/message?hash=…”.

I have the impression that this request is caused by the function “st.rerun” in a certain context.

Yes, I think for me it was from st.rerun within a fragment. I’m using streamlit 1.44.1 now which no longer has the issue.

1 Like

I removed an st.fragment and integrated it into a normal part of the page, and I haven’t seen this error for a little bit. So, I’d recommend removing whatever fragment is on the page that you’re getting the error on.