Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

First Heroku deploy failed `error code=H10`

I deployed my app to Heroku. It's a node.js + express + socket.io app and this is the package.json file

{   "name": "game_test",   "author": "Ilya",   "description": "A test app for our board game",   "version": "0.0.1",   "private": true,   "scripts": {     "start": "node app"   },   "dependencies": {     "express": "3.0.6",     "jade": "*",     "socket.io" : "*"   },  "engines": {       "node": "0.8.14"   } } 

This is the log I get:

heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=game-test-1.herokuapp.com fwd=37.26.146.185 dyno= queue= wait= connect= service= status=503 bytes= heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=game-test-1.herokuapp.com fwd=37.26.146.185 dyno= queue= wait= connect= service= status=503 bytes= 

What does it mean?

like image 755
ilyo Avatar asked Jan 14 '13 16:01

ilyo


People also ask

What is error code H10 heroku?

This article is focused on the Heroku H10-App crashed error code which is thrown when an application crashes on Heroku. First Heroku deploy failed `error code=H10` - Stack Overflow. "App crashed" has the obvious meaning: your app crashed. Look further up in your logs to see why, or heroku restart to launch...

Why am I getting application error on heroku?

"Application Error" or similar is always caused by your own application code. Routing errors will normally only surface themselves within the logs of your application. In most cases, you will be able to see the cause of the error there. To learn more about logging, please see our Logging article on DevCenter.

Why does heroku app keep crashing?

If your Procfile is pointing to the wrong server file. e.g If your server is in server. js and your Procfile points to app. js this would definitely crash your app and Heroku would greet you with the H10-App crashed error code message.


1 Answers

Found solution for me here: Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)

In my case my app crashed because I was hard setting the PORT, instead of using the port that heroku dinamicaly sets, which can be accessed with process.env.PORT

app.listen(process.env.PORT || 3000, function(){   console.log("Express server listening on port %d in %s mode", this.address().port, app.settings.env); }); 
like image 62
Martin Schaer Avatar answered Oct 18 '22 21:10

Martin Schaer