Deploying with Heroku - H10 App Crashed Error

I’m trying to deploy a Streamlit app with Heroku. I followed these instructions, but when I run the ‘heroku open’ command, the app tells me to check my logs. When I do, it says I have an H10 error. I have made sure that I am not manually creating a port which seems to be the standard source of this issue. Any debugging suggestions are much appreciated.

I have:

Procfile:

web: sh setup.sh && streamlit run app.py

requirements.txt:

streamlit==0.60.0

setup.sh:


    mkdir -p ~/.streamlit/
    echo “\
    [general]\n\
    email = \”<myemail@domain>\”\n\
    “ > ~/.streamlit/credentials.toml
    echo “\
    [server]\n\
    headless = true\n\
    enableCORS=false\n\
    port = $PORT\n\
    “ > ~/.streamlit/config.toml

and of course my app.py file

It says to check the logs, what’s in your logs?

H10 according to the dev centre is just that your app crashed. Are those config files written correctly?

My logs just say H10 Error. The config.toml file does not exist by default, but that shouldn’t be the problem. Many people have deployed successfully without creating it.

I finally managed to deploy by switching to ssh authentication. I’m still not sure what the issue was.

I had a similar problem which got sorted by editing the setup.sh file
mkdir -p ~/.streamlit/
echo “
[server]
headless = true
enableCORS=false
port = $PORT
“ > ~/.streamlit/config.toml

2 Likes