Cannot open streamlit on browser via any links provided

I am a beginner of streamlit and try to run streamlit hello locally after the installation.

When I try to open the localhost link, the error message is:
This site can’t be reached
localhost refused to connect.
Try:

When I try to open the network link, the error message is:
This site can’t be reached
http://172.28.0.12:8555/ is unreachable.
ERR_ADDRESS_UNREACHABLE

When I try to open the external link, I cannot reach it and the web page keeps loading.

I tried to check my firewall and proxy settings on Mac, and they did not block anything like HTTP.

My Streamlit version is 1.38.0 and Python version is 3.10.12

Thanks in advance for any help and suggestions to address this issue!

Hi @Aiqi! Are you seeing any errors in your terminal when running streamlit hello?

Hi @Nico, no errors here and URLs are presented. The output message is as below:

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false. Welcome to Streamlit. Check out our demo in your browser.
Local URL: http://localhost:8555
Network URL: http://172.28.x.xx:8555
External URL: http://34.75.xx.xxx:8555
Ready to create your own Python apps super quickly? Head over to https://docs.streamlit.io
May you create awesome apps!

Btw, I am using colab to try Streamlit demos. Could any issues be here via colab?

Hi @Aiqi, running via colab is definitely the issue – for it to work properly, you need to make colab expose the app in a way that is accessible from a different machine (your computer). I would recommend looking around for other posts about colab, like this one How to Launch Streamlit App from Google Colab Notebook and here Free Streamlit Dev Environment through Colaboratory

I’m not sure how up-to-date any of those solutions are, but my guess is that the easiest way will be to install and use a tool like ngrok or localtunnel, so that you get a url that you can go to from anywhere to access the streamlit app running on colab.

Or, you can just install streamlit on your machine and do streamlit hello from there to help get started.

Thanks @blackary. My issue has been solved! I try to set up ngrok and it works on colab. And I also reset streamlit on my Mac and it also works with/without ngrok now.

1 Like

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