Streamlit app stuck in "please wait" when deployed in Google App Engine

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:

     import streamlit as st

     st.header("Header section")
  1. app.yaml
    runtime: python38

    entrypoint: streamlit run --server.port 8080
  1. requirements.txt


I tried both of the solutions mentioned here : App is not loading when running remotely - Streamlit Docs. But it didn’t work.

I also tried changing the version of Python and Streamlit and changing the server port but no luck.

Is there anything that I am missing while deploying?

Hey @sprasai,

Thanks for sharing this question!

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:

Sharing @sprasai’s replies from this thread for future users who might be encountering this issues:

I followed the instruction mentioned here: Deployment

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!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.