Streamlit app crashes

I’ve been trying to deploy my streamlit app on heroku and it keeps crashing. I wonder what’s the issue. Any help will be much appreciated. Thanks!

heroku logs --tail is pasted below:

\2020-05-14T18:36:15.085345+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-14T18:36:22.841097+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=img-manipulator-app.herokuapp.com request_id=0556fb59-b4c3-4820-a826-cec4867e3baf fwd="36.255.230.52" dyno= connect= service= status=503 bytes= protocol=https
2020-05-14T18:36:23.914980+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=img-manipulator-app.herokuapp.com request_id=c69e97f5-15d2-4300-a6a0-37388ef876b2 fwd="36.255.230.52" dyno= connect= service= status=503 bytes= protocol=https
2020-05-14T18:37:01.133286+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=img-manipulator-app.herokuapp.com request_id=a98b1555-a93a-4a81-bfb7-616f6da58eea fwd="36.255.230.52" dyno= connect= service= status=503 bytes= protocol=https
2020-05-14T18:37:01.950733+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=img-manipulator-app.herokuapp.com request_id=84291f4f-a12c-43ab-97c0-4117811e101f fwd="36.255.230.52" dyno= connect= service= status=503 bytes= protocol=https
2020-05-14T18:40:06.004284+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-14T18:40:20.995841+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-14T18:40:22.466502+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=img-manipulator-app.herokuapp.com request_id=6fa6bf4e-e0fc-4856-8797-c041b7c562a5 fwd="36.255.230.52" dyno= connect= service= status=503 bytes= protocol=https

Hi @Blues1998, welcome to the Streamlit community!

Unfortunately, your log doesn’t provide a whole lot of information here. Would you be able to post more of the log, or a minimal example to help us understand your use case?

Best,
Randy

I’ve also got same problem.
So far solution I got -

  1. Check server.js file for port connection, because Heroku uses it’s random port, so better use const const PORT = process.env.PORT || 8000
  2. Check package.json for postbuild if you haven’t used ‘npm run build’
  3. Extra spacing can produce such types of error.
  4. Check your production enviroment properly. etc.