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 ?

4 Likes

Any idea why that happens ?
Thanks

1 Like

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

Hi @Anatole_Callies, did you found the solution for it?

I am getting the same warning while loading application, it comes around 1-2 seconds and goes right away. But application works as expected.

Do you have any thoughts or code to not get this popup while loading the application?
Thanks.

2 Likes

Yeh I keep sporadically getting this warning on my heroku deployed app as well - is there any fix to get rid of the warning?

1 Like

I finally squashed these warning popups by turning off “Enhanced Tracking Protection” for the application site in my browser, which FWIW is Firefox 115.8.0esr.

Streamlit version 1.32.0 is now available and includes a significant improvement for custom components. The timeout warning for custom components was replaced with an element skeleton to improve the UX for slow loading components, especially in some cloud-hosted platforms.