Ec2 streamlit stuck on loading screen while running streamlit hello

Hi @thiago,

I tried all the fixes in the troubleshooting page but the solutions did not work. I am seeing the following error:

main.a776e35c.chunk.js:1 WebSocket connection to ‘ws://34.X.X.X:8501/stream’ failed: Error during WebSocket handshake: Unexpected response code: 403. Very similar to @razor.

Any idea why that might be happening?

I am using Streamlit, version 0.62.0

Thanks!

1 Like

this also suddenly started for me, it was working one moment and it didn’t the next (I didn’t upgrade any packages or install anything) and restarting didn’t help.

Hi @Jorge and @zen1, @thiago flagged this internally to our engineering team, so hopefully we’ll know more shortly.

Best,
Randy

Also seeing this issue today - please keep me posted on a solution or a workground (downgrading to a previous version?). Thanks!

Solved my issue- an upstream load balancer wasn’t passing the websockets correctly.

1 Like

@mappingvermont, do you mind sharing how you resolve the issue by changing your load balancer? Thanks a lot.

hey @Jack_G!

I should have been more clear- I was trying to deploy behind a load balancer running http-proxy, which doesn’t support websockets. Not sure if this is the case for you, but definitely check if it is. Hope this helps!

It happens to me too, and I am not behind a load balancer. And it happens on all browsers.

A year later I’m still experiencing issues when I deploy to EC2. I’ve gone through the FAQ again, but still couldn’t find a permanent solution to the issue :frowning:

@randyzwitch This is an interesting issue that I‘m currently facing. Did you manage to solve it?

I also observed the following: If I open the app in a new tab, the old one completes loading.

may i ask you, where can i acces the ~/.streamlit/config.toml ?

I tried all the troubleshooting things here App is not loading when running remotely - Streamlit Docs and no luck. I’m behind a proxy. It works on most machines, 2 computers and 2 iphones, but it doesn’t work on 2 other iphones, so it is some kind of weird something or other. It just says “Please wait…” on those two unlucky phones.

1 Like

It looks like if I restart my phone it works once and only once.

1 Like

Have you worked around this issue?

I am having the same problem here. Nginx is serving my streamlit app trough reverse proxy and it works fine in desktop (Chrome and Firefox) but when I try to access it from an iPhone it gets stuck in “Please wait…”

Having similar issues. I am using AWS ec2 ubuntu and these steps fixed it on my end:

a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel

hopefully it helps.

1 Like

Where do we see the logs? Server logs in particular?