Your app is having trouble loading the XXX component

Hi,

My streamlit app uses 2 custom streamlit components (namely the cookie manager from GitHub - Mohamed-512/Extra-Streamlit-Components: An all in one place, to find complex or just not available components by default on streamlit. and GitHub - ash2shukla/streamlit-bokeh-events: A streamlit component for bi-directional communication with bokeh plots.) and it is deployed on GCP Cloud Run using Docker.

Sometimes (I would say with a frequency of 20%) one or both components fail to load with the below error

As it happens to both components I don’t think it’s related to the way they are written.

I saw on other threads that it could have been fixed by this : Don't unmount iframe after custom component timeout by tconkling · Pull Request #3315 · streamlit/streamlit · GitHub but it’s apparently not the case.

I can see in the console that for some reason it fails to load static JS files:
GET https://<MY_APP_URL>/component/extra_streamlit_components.CookieManager.cookie_manager/static/js/main.743eab49.chunk.js net::ERR_ABORTED 404

I don’t know why this GET request fails as I can easily load the corresponding URL in my browser.

Do you know any way to fix this ?

2 Likes

Any idea why that happens ?
Thanks

I’m a same situation.
But I discover how to force this warning, blocking conections with socket:

In the first lines on your code:

import socket
def guard(*args, **kwargs):
    print("Internet Blocked")
socket.socket = guard

And cookie:manager never load, only show the warning.
Maybe the solution is for this way

regards