I developed a web app using Streamlit, and it runs on my localhost. However, after deploying it on Google App Engine, it consistently shows a “please wait” message on the screen. I am using python 3.8 and Streamlit version 1.24.
For the testing I just deployed three files:
app.py
import streamlit as st
st.header("Header section")
app.yaml
runtime: python38
entrypoint: streamlit run app.py --server.port 8080
I did some digging and found this thread where some folks shared what worked for them in terms of deploying to Google App Engine – in particular, some users mentioned they had to disable CORS and that they followed these instructions to specify a custom runtime. Just wanted to share that in case it’s helpful for your use case.
Here are a few other replies that shared exactly what worked for them in deploying to Google App Engine:
Hi, I’m facing the websocket issue with all the streamlit pages showing “Please wait” for around a minute or more before rendering the components frequently. Sometimes the page loads up fast but most of the times it takes a long time before showing the components.
Now, this happens only when I hit the server through the AWS ALB HTTPS URL and that too, not all the time (so perhaps not security group issue, I think?). Hitting the ec2 instance server directly works perfectly without any timeouts for websockets or the /_stcore/stream endpoints. The console shows websocket time out for “wss://domain/_stcore/stream” multiple times and then finally after a while it becomes 101 status and connection upgrade for that endpoint and displays the page.
I’m not using Nginx, I’m using AWS ALB for SSL termination. I have tried setting the CORS, webSocketCompression and other flags to false but nothing worked. Tried with different browsers, still no luck. Streamlit 1.24.0 and python 3.9 (tried 3.10 but still no luck). If someone could help on this, that would be really great!