Hi, I exposed the 8501 port on ec2 as required but for some reason the screen is stuck on loading:
Any idea how to resolve this ?
Hi, I exposed the 8501 port on ec2 as required but for some reason the screen is stuck on loading:
Try setting
[server]
enableCORS=false
in your ~/.streamlit/config.toml
.
Does this file already exist or should I create one ?
Great! that fixed the issue just created the file with the above value in it.
Unfortunately, âenableCORS=falseâ doesnât work.
After setting this option, I still get âPlease waitâŠâ screen when trying to connect to my EC2 (Iâve checked that the config is loaded properly via âstreamlit config showâ and my 8501 port is open)
Iâve also tried binding it to 0.0.0.0 like when I deploy gunicorn (browser.serverAddress=â0.0.0.0â), as per How do I set the server to 0.0.0.0 for deployment using Docker
Not sure if itâs relevant, but when I try the /healthz route, I get âOKâ.
Any other ideas on how to resolve this?
Iâve encountered the same issue on several other EC2 instances I tried. I was so excited to showcase your amazing app to our team tomorrow
(but regardless of this issue - this is an amazing tool, guys!! )
Update: It works when I run streamlit on localhost on EC2 (browser.serverAddress=âlocalhostâ) and forward my port via SSH tunnel. But I still havenât found a way how to make it accessible on instanceâs public IP.
Update 2: I just got home and got a very strange behaviour.
Update 3: It again stopped working this morning (despite no changes). Since then, Iâve tried multiple AWS accounts, regions, set ups and streamlit apps with no difference. Winning combo (when it works) is as per my Update 2, but itâs quite temperamental, which makes it hard to reproduce & debug⊠I guess Iâll wait for a more stable release (EC2-wise).
For completeness: Issue is on path /stream that keeps hitting âWebSocket is closed before the connection is established.â and over time changes into âError during WebSocket handshake: Unexpected response code: 503â
Update 4: Temporary solution seems to be to put your EC2 behind an ALB that forwards from port 80 to whatever your Streamlit port is (eg, 8501).
Hi all,
I had a similar issue when deploying on heroku. It would get stuck loading. I added the enableCORS=false
to my setup.sh file and it worked for the simple data frames and charts examples from the âGet Startedâ page.
I tried deploying the The Data Explorer app to heroku but I am getting the same errors I was getting on my Mac:
Funny thing is that the app works when I run it on locally on my machine:
I have the same problem now - Iâve managed to load the hello app without a problem now, but my own app keeps giving the same error, as youâre describing:
Update: This error is most likely covered here: https://github.com/streamlit/streamlit/issues/242 and as per Thiagoâs message earlier today, it has been fixed and should go into prod version over the next couple of days (Blindly following setup instructions)
@gabe_maldonadoâs hash issue and @sviluppâs TypeError indeed look like https://github.com/streamlit/streamlit/issues/242 . So those should be fixed soon!
As for the @gabe_maldonadoâs issue with port 80, Iâm not so sure whatâs happening. We fixed a bug related to port 80 a few point-versions ago. So perhaps youâre not running the latest Streamlit? Can you please double-check the version you have?
$ streamlit version
Should be 0.47.4
I have version 0047.4 running on both, Win7 and mac, machines.
I was able to successfully deploy the DataExplorer app on heroku by commenting out the @st.cache decorator.
Commenting out the decorator on macos allows me to load the data and see the dataframe but then I get:
Also, it is strange that this line of code:
st.subheader(f'Map of all pickups at {hour_to_filter}:00)
works perfectly in Windows but when I run it on the macos I get an âinvalid syntaxâ, âunxpected token â)ââ and an âundefined variable âfââ errors.
GM
TypeError : âellipsisâ object is not iterable
This looks like this Altair bug with Python 3.5.1: TypeError: 'ellipsis' object is not iterable · Issue #972 · altair-viz/altair · GitHub
it is strange that this line of code:
st.subheader(f'Map of all pickups at {hour_to_filter}:00)
works perfectly in Windows but when I run it on the macos I get an âinvalid syntaxâ, âunxpected token â)ââ and an âundefined variable âfââ errors.
Youâre likely using a version of Python that doesnât support f-strings. Those were added in Python version 3.6.
So your best bet for both of these is just to upgrade Python to a more recent version
Interestingly, I get this issue when I access the Streamlit server via its domain name (SERVERHOSTNAME:8501) but not when I access it at itâs IP address (10.X.X.X:8501). Iâm running it on Windows Server 2016 in a conda environment.
Hey @antikythera!
Can you try setting the
[browser]
serverAddress = [your server hostname]
setting in your Streamlit config? (Instructions on the config are here: https://streamlit.io/docs/cli.html).
If youâve already tried this and itâs not working, then it may be a network issue. Are you running it on a local server, or some hosting provider? Do you have a firewall that whitelists only certain types of traffic to certain hostnames? Or perhaps an Ngninx or Apache server acting as a reverse proxy for your Streamlit app, and that has routing rules that may be preventing this from working?
Streamlit serves normal HTTP requests as well as WebSocket requests over its port. Depending on what youâre integrating with, you may need to explicitly enable WebSocket traffic to get Streamlit to work.
Hi,
Iâm getting the âplease waitâ issue as well on ec2 instance. Iâve added the âenableCORS=falseâ and it has not been resolved.
my nginx is as follows:
location /study/ {
proxy_pass http://xx:xx:xxx:xx:8501/;
}
Any suggestions?
Thanks
Hi @karma,
Did you try these following steps from our FAQ: https://github.com/streamlit/streamlit/wiki/FAQ ?
Thanks @arraydude, the template from @virusvn fixed the issue
I am facing exactly the same problem. I followed this tutorial to deploy to an EC2 instance. I am trying to access the app via the external IP (no domains involved). I am running streamlit hello --server.enableCORS=false
but still get stuck in a âPlease waitâŠâ screen.
This is how Chromeâs console looks like:
Any ideas?
An update: apparently the issue is specific to Google Chrome. It works just fine on Microsoft Edge
This is happening to me locally (macOS Catalina 10.15.5) running streamlit hello
only on Chrome (streamlit version 0.62.0).
Hi @EilonBaer!
Is this happening when running on a server, or when running locally?
If server, can you try the updated instructions from our troubleshooting page?
We recently added websocket compression and XSRF-prevention logic to Streamlit, which should improve app but have the unfortunate side-effect of adding a couple of steps to Streamlit deployments
Hi @thiago, thanks for the reply.
The issue was happening locally, but turned out to be unrelated to streamlit. I had just integrated the SentinalOne Chrome extension and that caused connectivity issues (happened with Jupyter as well). Disabled the extension, all back to normal. Thanks!
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.