Home > Blockchain >  How to solve heroku deployment error for flask app
How to solve heroku deployment error for flask app

Time:11-24

It is my first time trying to deploy flask app to heroku. While trying to do so, I am able to build it successfully, but when I open the app, I find the following message:

Application error
An error occurred in the application and your page could not be served. If you are the 
application owner, check your logs for details. You can do this from the Heroku CLI 
with the command

Upon checking my logs, I get the following:

2021-11-21T03:23:43.909513 00:00 heroku[router]: at=error code=H10 desc="App crashed" 
method=GET path="/" host=myapp.herokuapp.com request_id=6ca38bf1-291f-47b7-b736- 
d80b1d331182 fwd="49.37.37.192" dyno= connect= service= status=503 bytes= 
protocol=https
2021-11-21T03:23:44.906996 00:00 heroku[router]: at=error code=H10 desc="App crashed" 
method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=34032e6e-0588-4904- 
94f6-b7cacfef1364 fwd="49.37.37.192" dyno= connect= service= status=503 bytes= 
protocol=https

Being new in this area, I am not able to make out what this error means. I tried searching the internet, but didn't find resources specific to my question.

Additional info:

I am using github and on heroku I am using GitHub connected method to deploy.

Can someone please explain me what it means and how to solve it.

CodePudding user response:

The main aspect was a missing gunicorn in the requirements.txt file. Once that was done, everything else works fine.

  • Related