@tommaso-moro @giddyphysicist Can you both check if you are running Streamlit version >= 1.11
? If refresh is triggered by some interactions with widgets, it might be related to a widget loss issue we had in version 1.9
and 1.10
.
@lukasmasuch , thank you! I had been using version 1.10. Updating to 1.11.1 seems to have fixed it for me (both locally in a docker container and on the newly released cloud version). I’m waiting to get some feedback from the app users, but for now the version update seems to have fixed it. Thanks so much!
Hi @tommaso-moro @giddyphysicist @Julitocast
Sorry to hear you’ve experienced that issue, and thanks for reporting it
The issue seemed to be caused by a bug invalidating the anonymous users’ sessions whenever someone disconnected Github from their account.
That bug was fixed today and released, so users should not encounter the issue anymore, yet please let us know if you’re still experiencing it.
Happy Streamlit-ing!
Charly
Hello Charly, I am having the same issue. However the app is deployed in google cloud platform.
upon several research I found out that in google cloud, the app need to return a request. so basically my app keep hitting the request timeout.
I’m on v.1.14.1 and my users keep reporting this random refresh issue on Streamlit Cloud. This is a serious bug that needs to be fully rectified.
Same thing here.
My app works perfect in local, but when deployed to google cloud it refreshes automatically every 1.5 to 5 minutes randomly.
This refresh deletes all the things done or selected by the user, which i think is a serious bug.
Looks like it happens in streamlit cloud and google cloud, so not a one cloud system issue.
I have try a couple of workarounds but none of them worked.
a) first workaround, set this in the config.toml file
[server]
runOnSave = true
b) second workaround: set a ping to a random server at the end of my code, with a sleep time of 5 sec. this way the app is always active and you can make sure of it as the running icons on the top right corner are moving. But didn´t work.
Also thought this could be a browser issue (browsers auto refresh tabs normally), so I took a tab in chrome to run the app, and disabled the auto refresh options of the browser. But didn´t work either.
There is another discussion with the same topic here:
I found the solution for google cloud deployed apps. Not for streamlit cloud, sorry.
FOR GOOGLE CLOUD:
In your app control panel, there is a menu with metrics,details, and YAML
YAML (short for “YAML Ain’t Markup Language”) is a human-readable data serialization format. It is often used for configuration files and can be more readable and less verbose than other formats such as JSON and XML.
In Google Cloud Run, you can use YAML files to define and configure Cloud Run services. These YAML files, called cloudbuild.yaml
, are used by the Google Cloud Build service to build and deploy containers to Cloud Run.
find the timeoutSeconds spec, that should be set to 300 by default.
Enter Edit mode for this file
Change timeoutSeconds to 3000, for example. 3600 is the max allowed
Then you are asked to change also the name of the template:
spec:template:metadata:name
in my case was energyanalyzer-00014-qel and changed to energyanalyzer-00015-qel
Save and implement again. This solves the issue.
I guess streamlit guys should change this value, as far as I know we cannot configure this param by ourselves.
Same here. Streamlit v1.15.2.
same here streamlit 1.17 also locally but only on firefox
same here in 1.17 in chrome
Same problem here. Any workarounds or permanent fixes? I have a web app which can run for a long time I don’t want the webpage to refresh until the job is done
Hi @ikarimov, @gustavz, @ranibaron,
I’m just checking in to see whether you’re still experiencing the issue.
If the issue persists, could you please provide us with access to a public app where we can attempt to replicate the problem?
Best wishes,
Charly
Thanks, @ailyze.
Would you be able to share the code privately, or alternatively, parts of that code so we can attempt to reproduce this issue, please?
Thanks,
Charly
I sent you a message with the code.
Thank you very much, @ailyze!
I’ve passed your code to the devs. Hopefully, that will help us unveil the issue that some of the other users are facing.
I will let you know as soon as I hear from them.
Thanks all for your patience
Charly
Hi Charly,
I’m still experiencing the same issue. You can check it out here: https://ranibaron-behavioral-profiling-behavioral-profiling-v1-0-z324ol.streamlit.app/
The app refreshes automatically each few minutes. I can see that best when uploading a data file and after the refresh I have to start the analysis anew.
Attached, please find a “legal” csv file to drop on the file upload component.
Thanks,
Rani
Thanks for reporting the issue, @ranibaron!
I have reported it to the developers, and we will keep you posted.
Best,
Charly