Errors When Visiting Heroku-deployed Flask App
Solution 1:
I think you are missing the PORT which you need to assigning using the env variable $PORT (provided by Heroku)
app.run(debug=False, port=int(os.environ.get("PORT", 5000)), host='0.0.0.0')
Solution 2:
Looking at your debug output, I see that the script is exiting/crashed due to the port already in use. Check if you have any other local server running on the same port on the command line or service. See this line? it tells you what's the reason it failed.
OSError: [Errno 98] Address already in use
Find the pid process and shut it down/terminate it. There must be another process listening on the port. You might find out that process by using the following command:
$ lsof -i :5000
and then run sudo to kill the process.
sudo kill -9 <process_id>
However, I see now Error code h10 in heroku logs.
This error is thrown if in a Node. js environment, you forget to set a start script . Heroku uses this script to start your app so if it is missing, it would throw an H10-App crashed error code message.
Check your Procfile file, look up for spacing errors.
Wrong web :nodeserver.jsCorrectweb:nodeserver.js
Post a Comment for "Errors When Visiting Heroku-deployed Flask App"