When I run streamlit hello it works very well in my local browser. When I try to connect from another computer on the network, using the provided network url or using the local ip address of the computer running the app, streamlit seems to get stuck on connecting.
What are the steps we should take to reproduce the bug:
streamlit helloI expected to be able to access the running app over the network, and being able to see the hello-example in the browser on another computer.
On the computer not running the app, you do see that it is trying to do something but it never connects to the streamlit server.

no, I have not had this work before
If needed, add any other context about the problem here.
This is happening with me as well. I am running inside a docker container. Works fine when I run on my local box, but stuck at "please wait" when I try to access over the network. Mapping container ports 8501:8501.
FROM python:3
WORKDIR /app
RUN pip install numpy
RUN pip install pandas
RUN pip install sqlalchemy
RUN pip install pymysql
RUN pip install matplotlib
RUN pip install streamlit
COPY ./ ./
ENTRYPOINT ["streamlit", "run", "app.py"]
Based on the screenshot it looks like the HTTP request to load the page and static resources is working, and that it's the Websocket connection that is failing.
So my guess is this is because of CORS
Can you try either disabling CORS or configuring it in Streamlit?
To disable it, set this in .streamlit/config.toml:
[server]
enableCORS = false
To configure it, set this instead:
[browser]
serverAddress = "the_address.com" # Can be an IP address too
Finally, if none of that works, it would be great to get a HAR file so we can debug: https://support.zendesk.com/hc/en-us/articles/204410413-Generating-a-HAR-file-for-troubleshooting.
Thank you for your answer. I looked for ~/.streamlit/config.toml and it was not there. In ~/.streamlit only credentials.toml existed. I created config.toml with only this in it:
[server]
enableCORS = false
This indeed fixed the problem for access over the local network.
Configuring it with
[browser]
serverAddress = "the_address.com"
does not work. If I navigate to the_address.com/8501 both on the computer that runs the app and other computers on the network the browser does try to go to the network ip address that streamlit gives in the console but I get server-not-found errors.
I am having the same issue. I am using Ubuntu 16.04 with Python 3.6, but for some reason, I don't have this file on my system "config.toml". I only have "credentials.toml". Is this normal? What could be wrong here?
some
I am having the same issue. I am using Ubuntu 16.04 with Python 3.6, but for some reason, I don't have this file on my system "
config.toml". I only have "credentials.toml". Is this normal? What could be wrong here?
I also did not have the config file. When I made and edited it as described above it did work. I am now also curious if this file is supposed to be there with a clean install of streamlit.
@DanielDondorp I agree that it would better to include 'config.toml' by default with any clean install of streamlit.
Streamlit doesn鈥檛 create any config files and it uses all default values.
If you鈥檇 like to see all config options you can run streamlit config show, and if you鈥檇 like to create your own config.toml file you can copy all the values from streamlit config show and edit where needed.
Hope this helps and feel free to let me know if you have any other questions!
Ok, thanks for the help. I`ll consider this one closed.
Is there a single/system-wide config? What is the behavior when using streamlit in different virtual environments?
@dcaminos inside of a conda environmet where should I place my config.toml file?
@drorata, @kurt-rhee have you figured out how?
Hey @mneira10 I got a response here:
https://discuss.streamlit.io/t/config-in-windows-conda-environment/1295
But I still haven't been able to get a connection working with streamlit server over my network
Changing the configuration mentioned above, solved my issue. I still don't know how to have different configurations for different virtual environments.
I have the same problem accessing my application form an external network.
I have tried every step described above but none worked.
Streamlit is running on a linux VM and I've a proxyconfig pointing to the VM on port 8501.
does anyone have any ideas what could be the problem?
Hi @drorata, @mneira10,
Streamlit configuration is set with the following precedence:
cwd is the folder you're running streamlit from)home is the user's home folder)There is no virtual environment specific way to have different configs. You'll need to be running streamlit from different folders to have multiple local configurations, unless you pass args in via the ClI.
Hi @LarsFichtel ,
Could you open a new issue for your problem?
Thanks!
I think the enableCORS is not what it really sounds. Instead of 'to enable CORS', it's actually to filter out URLs. While not to enable CORS, then it's allowing the traffic to go through.
I have raised an issue #964 , and a change #965 for it.
i faced the same issue
i feel
http:// version of the app is faster
compared to the https://
since https:// connects after more than 3-4 mins
while
http:// connects within a minute
Most helpful comment
Thank you for your answer. I looked for ~/.streamlit/config.toml and it was not there. In ~/.streamlit only credentials.toml existed. I created config.toml with only this in it:
This indeed fixed the problem for access over the local network.
Configuring it with
does not work. If I navigate to the_address.com/8501 both on the computer that runs the app and other computers on the network the browser does try to go to the network ip address that streamlit gives in the console but I get server-not-found errors.