Is Streamlit broken? Blank page, deploying on Render worked, why not Streamlit?

My website deployed to Streamlit is displaying a blank page when visiting it from a custom domain See edit below for Render update.

What I did

  • I wrote my site, linked my Github repo to Streamlit and deployed it, shortened Streamlit URL
  • I then made two new CNAME records for my domain linking to the Streamlit site in Cloudflare dashboard where my domain was purchases and are managed. One CNAME record for the main URL, the other for “www”

Symptoms

  • When loading the site from the Streamlit link it works fine
  • When custom domain is tried the page is blank, only thing that loads is the Streamlit icon in the tab and Streamlit page title, nothing on the page itself.

Are there any addition files I need in my app’s root directory? Maybe some configuration step I missed?
My current folder structure

  • app.py
  • requirements.txt
  • .streamlit folder with config.toml file inside

I tried changing several settings on Cloudflare:

  • Changed SSL to Full, when set to Flexible threw redirect error
  • Turned off Always use HTTPS
  • Turned off Automatic HTTPS Rewrites
  • Tried replacing CNAME records with A records pointing to the site’s IP

EDIT I believe the issue has to do with SSL, I ran openssl s_client -connect <my site URL>:443
and received the following output:

    CONNECTED(00000005)
8679580928:error:1404B410:SSL routines:ST_CONNECT:sslv3 alert handshake failure:/AppleInternal/Library/BuildRoots/810eba08-405a-11ed-86e9-6af958a02716/Library/Caches/com.apple.xbs/Sources/libressl/libressl-3.3/ssl/tls13_lib.c:129:SSL alert number 40
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 287 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : 0000
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Start Time: 1677549075
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)

I believe this is saying there was an SSL handshake failure, SSL on Cloudlfare is set to full, how could I further troubleshoot this? Do I need to manually install an SSL Certificate? If so, how?

On my cloudlfare dashboard the SSL Certficate under Edge certificates is active and valid, I thought there was nothing else I needed to do but for some reason the SSL handshake is failing and I can’t figure out why.

EDIT2 I gave up on Streamlit, I decided to try deploying with Render and to my surprise it worked immediately, my custom domain and everything.

Is Streamlit just broken? I set the same settings with Render as Streamlit but Streamlit just refused to work with a custom domain. I’d prefer to know what’s going on exactly before giving up on the idea of deploying via Streamlit entirely.

Hi @AVGVSTVS,
I had a similar issue an hour back which brought me to this thread, I’m deploying Streamlit from Google Cloud Run via a docker container, and the public IP generated by Cloud run works as expected, but using a custom domain just showed an empty page. This is the exact same behavior as you see with Streamlit Cloud. Like you I too had all the security settings enabled, full SSL, TLS, auto HTTPs rewrite on etc.

However the issue for me was the orange cloud (Cloudflare proxying), which you can disable from your DNS settings on Cloudflare as described in the link.

Turning off the proxy solved it for me instantly, do let me know if it works with Streamlit Cloud as well. Hope it helps. Cheers.

Thanks for your reply! I just tried this with my second domain and unfortunately was unable to get past the blank screen even with proxy turned off for both DNS records.

Do you not get a browser security warning when visiting the site? I did, no matter my settings, when proxy was turned off.

I am using an A record for the root and CNAME for www, tried setting SSL to Full, Flexible, and Off, messed with always HTTPS and rewrites settings but no luck :frowning:

Is there any other configuration you might have had to do?

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