Need help solving my Heroku Application Error - node.js

Below are the logs I got when running heroku logs --tail in my CLI and here is a link to my repo. https://github.com/Tyler-Washington888/Goals-App
2022-06-27T13:19:28.501914+00:00 heroku[web.1]: Process exited with status 1
2022-06-27T13:19:28.577209+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-27T13:19:33.185957+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=goalapptyler.herokuapp.com request_id=73fab607-39fe-46d8-a556-9a0a632d901d fwd="73.0.250.131" dyno= connect= service= status=503 bytes= protocol=https
2022-06-27T13:19:34.087837+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=goalapptyler.herokuapp.com request_id=1a23b44a-cd55-4643-a624-cf5158a6f56b fwd="73.0.250.131" dyno= connect= service= status=503 bytes= protocol=https```

Related

unable to connect my mern application with heroku dont know where is wrong some one please help me with that

Application error:
i got some error in my logs
$ heroku logs --tail
2022-07-05T06:39:38.508197+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:12:1)
2022-07-05T06:39:38.508197+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1099:14)
2022-07-05T06:40:37.239154+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-07-05T06:40:37.271175+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-07-05T06:40:37.411800+00:00 heroku[web.1]: Process exited with status 137
2022-07-05T06:40:37.513052+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-05T06:40:37.516497+00:00 heroku[web.1]: State changed from crashed to starting
2022-07-05T06:40:42.264977+00:00 heroku[web.1]: Starting process with command `npm start`
2022-07-05T06:40:43.980138+00:00 app[web.1]:
2022-07-05T06:40:43.980156+00:00 app[web.1]: > backend#1.0.0 start
2022-07-05T06:40:43.980157+00:00 app[web.1]: > node ./index.js
2022-07-05T06:40:43.980157+00:00 app[web.1]:
2022-07-05T06:40:44.419275+00:00 app[web.1]: Example app listening on port http://localhost:5500
2022-07-05T06:40:44.421393+00:00 app[web.1]: Error connecting to Mongo MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
2022-07-05T06:40:44.421394+00:00 app[web.1]: at NativeConnection.Connection.openUri (/app/node_modules/mongoose/lib/connection.js:689:11)
2022-07-05T06:40:44.421395+00:00 app[web.1]: at /app/node_modules/mongoose/lib/index.js:377:10
2022-07-05T06:40:44.421396+00:00 app[web.1]: at /app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:32:5
2022-07-05T06:40:44.421396+00:00 app[web.1]: at new Promise (<anonymous>)
2022-07-05T06:40:44.421397+00:00 app[web.1]: at promiseOrCallback (/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:10)
2022-07-05T06:40:44.421397+00:00 app[web.1]: at Mongoose._promiseOrCallback (/app/node_modules/mongoose/lib/index.js:1220:10)
2022-07-05T06:40:44.421397+00:00 app[web.1]: at Mongoose.connect (/app/node_modules/mongoose/lib/index.js:376:20)
2022-07-05T06:40:44.421398+00:00 app[web.1]: at connectToMongo (/app/db.js:6:5)
2022-07-05T06:40:44.421398+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:12:1)
2022-07-05T06:40:44.421399+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1099:14)
2022-07-05T06:41:42.489735+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-07-05T06:41:42.555839+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-07-05T06:41:42.704973+00:00 heroku[web.1]: Process exited with status 137
2022-07-05T06:41:42.764933+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-05T06:41:45.708056+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=45b0e488-1081-49a4-babc-8ac017b331b4 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T06:41:46.719799+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=fa63469e-84d5-4e26-b9e9-b26c603ae18c fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T06:55:51.468435+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=7b3fb9c9-2a8c-4cdd-aa5b-14782ffe13bf fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T06:55:51.800574+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=08ca31ae-bda1-4858-85f7-9e2450d5e982 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:03:38.953758+00:00 app[api]: Release v9 created by user codewithmufaddal#gmail.com
2022-07-05T07:03:38.953758+00:00 app[api]: Set MONGO_URL config vars by user codewithmufaddal#gmail.com
2022-07-05T07:03:40.004416+00:00 heroku[web.1]: State changed from crashed to starting
2022-07-05T07:03:44.517238+00:00 heroku[web.1]: Starting process with command `npm start`
2022-07-05T07:03:45.966051+00:00 app[web.1]:
2022-07-05T07:03:45.966065+00:00 app[web.1]: > backend#1.0.0 start
2022-07-05T07:03:45.966065+00:00 app[web.1]: > node ./index.js
2022-07-05T07:03:45.966065+00:00 app[web.1]:
2022-07-05T07:03:46.381818+00:00 app[web.1]: Example app listening on port http://localhost:5500
2022-07-05T07:03:48.206096+00:00 app[web.1]: Connected to Mongo!
2022-07-05T07:04:45.309294+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-07-05T07:04:45.357684+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-07-05T07:04:45.492305+00:00 heroku[web.1]: Process exited with status 137
2022-07-05T07:04:46.095212+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-05T07:04:46.099519+00:00 heroku[web.1]: State changed from crashed to starting
2022-07-05T07:04:50.504015+00:00 heroku[web.1]: Starting process with command `npm start`
2022-07-05T07:04:51.598705+00:00 app[web.1]:
2022-07-05T07:04:51.598715+00:00 app[web.1]: > backend#1.0.0 start
2022-07-05T07:04:51.598715+00:00 app[web.1]: > node ./index.js
2022-07-05T07:04:51.598716+00:00 app[web.1]:
2022-07-05T07:04:52.013745+00:00 app[web.1]: Example app listening on port http://localhost:5500
2022-07-05T07:04:53.827531+00:00 app[web.1]: Connected to Mongo!
2022-07-05T07:05:51.110034+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-07-05T07:05:51.232487+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-07-05T07:05:51.360233+00:00 heroku[web.1]: Process exited with status 137
2022-07-05T07:05:51.437811+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-05T07:05:52.122029+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=aba6040c-520d-42b0-9b90-93e7c01441cf fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:05:52.873963+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=ee144b15-ffd9-42ca-a0c8-2754879ea951 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:06:02.753165+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=fd6b5acd-cc50-4290-8705-a182caa73690 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:06:03.040453+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=279426f8-5edc-4901-a43c-5402a236d2d3 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:06:06.108553+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=8bdae580-3616-40e3-8500-cb5f15802a36 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:06:06.415087+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=6e684264-ab14-4b30-9690-115142e24acf fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:06:43.000000+00:00 app[api]: Build started by user codewithmufaddal#gmail.com
2022-07-05T07:07:28.909507+00:00 app[api]: Release v10 created by user codewithmufaddal#gmail.com
2022-07-05T07:07:28.909507+00:00 app[api]: Deploy ae3db0ed by user codewithmufaddal#gmail.com
2022-07-05T07:07:29.171028+00:00 heroku[web.1]: State changed from crashed to starting
2022-07-05T07:07:30.000000+00:00 app[api]: Build succeeded
2022-07-05T07:07:37.798655+00:00 heroku[web.1]: Starting process with command `npm start`
2022-07-05T07:07:39.655884+00:00 app[web.1]:
2022-07-05T07:07:39.655895+00:00 app[web.1]: > backend#1.0.0 start
2022-07-05T07:07:39.655895+00:00 app[web.1]: > node ./index.js
2022-07-05T07:07:39.655895+00:00 app[web.1]:
2022-07-05T07:07:40.065691+00:00 app[web.1]: Example app listening on port http://localhost:5500
2022-07-05T07:07:41.879078+00:00 app[web.1]: Connected to Mongo!
2022-07-05T07:08:38.079247+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-07-05T07:08:38.108595+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-07-05T07:08:38.259120+00:00 heroku[web.1]: Process exited with status 137
2022-07-05T07:08:38.328162+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-05T07:08:39.465785+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=35b77c9d-45bb-489a-9541-e3da1b8ce6d2 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:08:39.741530+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=9a8e7998-1847-48ff-af83-dc0a71c0b13c fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:08:45.430719+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=09c09ca8-459d-42c2-bf41-01cb6b4e2827 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:08:45.758903+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=d646a0a3-24bd-49a6-9f24-ee15d908fe3b fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:09:16.734801+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=a810fe99-c12a-4bfd-9cd2-02f013b658a5 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:09:17.039258+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=fde5c406-02a2-4fd9-90f9-5cd3921e8d95 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:10:43.261020+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=a6ca50a7-a807-4d2b-a05a-557f01261720 fwd="103.132.29.188" dyno=
connect= service= status=503 bytes= protocol=https
2022-07-05T07:10:43.531049+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=93f8bb08-4eb4-4810-9bb0-d7ea3e00c866 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:11:01.599882+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=65e9a7b9-79f0-43b2-bb32-75fe3615aee7 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:11:02.006301+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=dc4780f7-b52b-45cd-ac7b-43d7b2086a6b fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:12:45.784622+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=082b677d-1e71-40d5-b5c1-959f1ffdfc23 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:12:46.095569+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=76e8886d-e511-4653-9ded-42714dad3675 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:17:39.116659+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=97baf221-e000-4a13-ab50-9eee526381bf fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:17:39.505369+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=5518dda5-6035-420d-9080-097696d04500 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:18:15.091809+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=4ef261d1-5677-4396-83ef-cb076ff8d705 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:18:15.412354+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=1d185b99-03fc-49b7-bd31-af5e8777c4fb fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:19:19.772384+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=b03e47c4-bdd4-41a9-8c86-40863a926057 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:19:20.181880+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=3172da8d-4891-4698-b27f-dbdf4ac173dd fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:23:40.514920+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hatsoffdigital-career.herokuapp.com request_id=adddf84e-c523-489b-9c8d-8ec3111ecf00 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
2022-07-05T07:23:40.828730+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hatsoffdigital-career.herokuapp.com request_id=e4305bf2-fef1-4c2f-8498-50dc64855199 fwd="103.132.29.188" dyno= connect= service= status=503 bytes= protocol=https
i am unable to understand that please help me with that ,
my code is running perfectly with localhost everything is fine but with heroku i dont know whats a problem
i have use mongo url also added in heroku confige var but still did't work
i am unable to understand that please help me with that ,
my code is running perfectly with localhost everything is fine but with heroku i dont know whats a problem
i have use mongo url also added in heroku confige var but still did't work
The problem is that your app is listening on the wrong port. You need to use process.env.PORT as the port to listen on. But your app shows it's listening on port 5500:
Example app listening on port http://localhost:5500
If you post your index.js or a link to a GitHub repo, I can give you more specific advice on fixing it.

Heroku application error after deployment of my MERN application

complete error log1
coplete error log2
2021-05-27T05:54:12.000000+00:00 app[api]: Build succeeded
2021-05-27T05:56:22.396351+00:00 heroku[web.1]: State changed from starting to down
2021-05-27T05:56:29.437265+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-savannah-94452.herokuapp.com request_id=ec3f4b22-7e21-4c24-a679-d9f8ef1c7e23 fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T05:56:30.409830+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-savannah-94452.herokuapp.com request_id=8bb728b9-ef47-4a23-b06e-abe7334f82bb fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T05:57:32.200085+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-savannah-94452.herokuapp.com request_id=8c67200b-e97a-4f11-9412-ff1f9a5c9f9b fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T05:57:33.051339+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-savannah-94452.herokuapp.com request_id=49816455-335e-43c0-8510-8eac82fa6bf1 fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T06:00:59.708138+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-savannah-94452.herokuapp.com request_id=3d392317-ef11-4f22-89f2-e6bb12683f49 fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T06:01:00.750294+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-savannah-94452.herokuapp.com request_id=b8c02355-9ca9-49e9-a8fe-e6648210dca7 fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T06:51:46.957912+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-savannah-94452.herokuapp.com request_id=8b4a33d2-7352-48a5-9d7f-c4c60313b24b fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
2021-05-27T06:51:47.856224+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-savannah-94452.herokuapp.com request_id=f5c69e61-2942-40c8-9be0-f368608ee4de fwd="43.247.159.7" dyno= connect= service= status=503 bytes= protocol=https
I deployed my MERN application on heroku and when I open the deployed application it shows "Application Error". Used the command "heroku logs --tail" which was given by heroku to log the errors and the above error log was displayed and "MODULE NOT FOUND" was shown but I am not able to find that path or this is some other error. Please help me resolve this.
Thanks in advance.

Application Error on when deploying git repo to heroku

I am deploying my repo on heroku but I keep getting application error. Note that Heroku and Github are connected. So the app gets deployed automatically
I have added engines to my package.json which does not seem to solve the problem
This is the error I get from heroku
2019-05-08T10:24:52.962552+00:00 app[web.1]:
2019-05-08T10:24:52.962779+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-05-08T10:24:52.962913+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-05-08T10_24_52_957Z-debug.log
2019-05-08T10:24:53.021611+00:00 heroku[web.1]: Process exited with status 1
2019-05-08T10:25:08.906685+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=node-js-app.herokuapp.com request_id=f1847a93-53e4-43ad-8616-8867e95d31c3 fwd="105.112.44.138" dyno= connect= service= status=503 bytes= protocol=https
2019-05-08T10:25:10.823468+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=node-js-app.herokuapp.com request_id=898935d3-5dda-4407-929a-20f13956b6dd fwd="105.112.44.138" dyno= connect= service= status=503 bytes= protocol=https
2019-05-08T10:27:19.725919+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=node-js-app.herokuapp.com request_id=122efddd-b5f1-4cf6-b527-c429a787d0e0 fwd="105.112.44.138" dyno= connect= service= status=503 bytes= protocol=https
2019-05-08T10:27:21.466801+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=node-js-app.herokuapp.com request_id=e51dfc00-6b08-4601-ab61-8d490e6010c0 fwd="105.112.44.138" dyno= connect= service= status=503 bytes= protocol=https
2019-05-08T10:29:10.740930+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=node-js-app.herokuapp.com request_id=abdd29b6-7106-4a2f-8133-3440f33dfd92 fwd="105.112.44.138" dyno= connect= service= status=503 bytes= protocol=https
2019-05-08T10:29:12.643465+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=node-js-app.herokuapp.com request_id=264d0150-cbe3-4b5e-bccb-941b5ef84176 fwd="105.112.44.138" dyno= connect= service= status=503 bytes= protocol=https
this is my package.json and server.js
"engines": {
"node": "10.13.0",
"npm": "6.x"
},
"scripts": {
"test": "nyc mocha --require #babel/register API/src/tests/index.test.js
--exit",
"build": "babel API/server.js --out-dir build",
"start": "babel-watch API/server.js",
}
...

How to fix H20 error when deploying app on Heroku?

My app works fine locally and I have deployed before in the past with success, for some reason it is no longer working.
The build is successful but when I access the app it states there is an error and directs me to the error log.
UPDATE: The app has come online by itself and working. Just today I did another deploy and same thing with the logs.
I've got an updated log report which may help with identifying the issue below:
2019-01-10T18:09:25.137016+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=extremeparts.happyfeed.io request_id=416dd308-07ef-431d-9f84-d11dd0ebb2a2 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=http
2019-01-10T18:09:32.777385+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=extremeparts.happyfeed.io request_id=397e7c62-3274-4cdf-b26e-f00f2c99ee21 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=http
2019-01-10T18:09:33.881452+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=extremeparts.happyfeed.io request_id=61e77c1f-1edb-4c68-becb-595a4aa5bcca fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=http
2019-01-10T18:10:41.103152+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=extremeparts.herokuapp.com request_id=ff3479ff-5b56-46a3-8714-66e6d9641569 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=https
2019-01-10T18:10:46.334074+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=extremeparts.herokuapp.com request_id=2633d447-0f58-4f5d-951f-2f01360b7eb1 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=https
2019-01-10T18:13:29.357357+00:00 heroku[web.1]: State changed from crashed to starting
2019-01-10T18:13:37.398825+00:00 heroku[web.1]: Starting process with command `npm start`
2019-01-10T18:13:40.904693+00:00 app[web.1]:
2019-01-10T18:13:40.904720+00:00 app[web.1]: > sms-funnel#1.0.0 start /app
2019-01-10T18:13:40.904722+00:00 app[web.1]: > nuxt build && nuxt start
2019-01-10T18:13:40.904723+00:00 app[web.1]:
2019-01-10T18:13:42.545513+00:00 app[web.1]:
2019-01-10T18:13:42.545554+00:00 app[web.1]: WARN vendor has been deprecated due to webpack4 optimization 18:13:42
2019-01-10T18:13:42.545556+00:00 app[web.1]:
2019-01-10T18:13:46.442346+00:00 app[web.1]: ℹ Compiling Client webpackbar 18:13:46
2019-01-10T18:14:23.738300+00:00 heroku[web.1]: Process running mem=667M(130.4%)
2019-01-10T18:14:23.738300+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2019-01-10T18:14:37.657497+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-01-10T18:14:37.657497+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-01-10T18:14:37.814331+00:00 heroku[web.1]: Process exited with status 137
2019-01-10T18:14:55.792511+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=extremeparts.herokuapp.com request_id=0fadedcd-d387-493a-bd0a-1b6463eb5ae1 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=https
2019-01-10T18:15:02.902463+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=extremeparts.happyfeed.io request_id=6a9c86ee-1ae9-427f-bd2b-b088d04e6050 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=http
2019-01-10T18:21:57.484369+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=extremeparts.happyfeed.io request_id=0bb304e5-744c-40fd-949d-516d15f9f244 fwd="66.207.216.130" dyno= connect= service= status=503 bytes= protocol=http

Heroku Nodejs app with R10, H10 and H20 errors

I tried to run my nodejs app[using socket.io]. I deployed it with no error. But when I run it, I got this:
2013-09-07T01:13:09.697674+00:00 heroku[api]: Release v2 created by vietminhle98#gmail.com
2013-09-07T12:15:57.148172+00:00 heroku[router]: at=info code= desc="Blank app" method=GET
path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=502 bytes=
2013-09-07T12:15:57.672631+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=502 bytes=
2013-09-08T01:14:00+00:00 heroku[slug-compiler]: Slug compilation started
2013-09-08T01:14:28.327510+00:00 heroku[api]: Scale to web=1 by vietminhle98#gmail.com
2013-09-08T01:14:28.351861+00:00 heroku[api]: Add PATH config by vietminhle98#gmail.com
2013-09-08T01:14:28.382733+00:00 heroku[api]: Release v3 created by vietminhle98#gmail.com
2013-09-08T01:14:28.426015+00:00 heroku[api]: Deploy 6be3e0c by vietminhle98#gmail.com
2013-09-08T01:14:28.439849+00:00 heroku[api]: Release v4 created by vietminhle98#gmail.com
2013-09-08T01:14:28+00:00 heroku[slug-compiler]: Slug compilation finished
2013-09-08T01:14:32.477748+00:00 heroku[web.1]: Starting process with command `node server.js`
2013-09-08T01:14:34.751076+00:00 app[web.1]: LISTENING
2013-09-08T01:14:35.314545+00:00 app[web.1]: info: socket.io started
2013-09-08T01:15:34.427477+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-09-08T01:15:34.427784+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-09-08T01:15:35.676986+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-08T01:15:35.676986+00:00 heroku[web.1]: State changed from crashed to starting
2013-09-08T01:15:35.663597+00:00 heroku[web.1]: Process exited with status 137
2013-09-08T01:15:37.774955+00:00 heroku[web.1]: Starting process with command `node server.js`
2013-09-08T01:15:38.653254+00:00 app[web.1]: LISTENING
2013-09-08T01:15:38.755820+00:00 app[web.1]: info: socket.io started
2013-09-08T01:15:59.434156+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:16:27.246666+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:16:38.781151+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-09-08T01:16:38.781376+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-09-08T01:16:39.983421+00:00 heroku[web.1]: Process exited with status 137
2013-09-08T01:16:40.011325+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-08T01:16:41.541487+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:18:44.971726+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:18:47.279357+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:20:09.452479+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:20:08.839678+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:26:06.279799+00:00 heroku[web.1]: State changed from crashed to starting
2013-09-08T01:26:08.503114+00:00 heroku[web.1]: Starting process with command `node server.js`
2013-09-08T01:26:09.522676+00:00 app[web.1]: LISTENING
2013-09-08T01:26:09.656509+00:00 app[web.1]: info: socket.io started
2013-09-08T01:27:09.615998+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-09-08T01:27:09.616415+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-09-08T01:27:10.895911+00:00 heroku[web.1]: Process exited with status 137
2013-09-08T01:27:10.909789+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-08T01:27:13.347426+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:27:14.033545+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:28:02.549578+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:28:06.335482+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/index.html host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:28:07.041450+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= serv
ice= status=503 bytes=
2013-09-08T01:34:23.479191+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/index.html host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:34:24.942938+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:34:29.678584+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:34:29.090141+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:36:38.073605+00:00 heroku[web.1]: State changed from crashed to starting
2013-09-08T01:36:41.051197+00:00 heroku[web.1]: Starting process with command `node server.js`
2013-09-08T01:36:42.526835+00:00 app[web.1]: LISTENING
2013-09-08T01:36:42.927958+00:00 app[web.1]: info: socket.io started
2013-09-08T01:37:02.906047+00:00 heroku[api]: Scale to web=1 by vietminhle98#gmail.com
2013-09-08T01:37:43.000152+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-09-08T01:37:43.000399+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-09-08T01:37:44.751965+00:00 heroku[web.1]: Process exited with status 137
2013-09-08T01:37:44.766078+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-08T01:45:39.155699+00:00 heroku[api]: Starting process with command `rake db:migrate` by vietminhle98#gmail.com
2013-09-08T01:45:41.607954+00:00 heroku[run.2140]: Awaiting client
2013-09-08T01:45:42.584829+00:00 heroku[run.2140]: Starting process with command `rake db:migrate`
2013-09-08T01:45:43.920789+00:00 heroku[run.2140]: Process exited with status 1
2013-09-08T01:45:43.935727+00:00 heroku[run.2140]: State changed from starting to complete
2013-09-08T01:46:55.968060+00:00 heroku[web.1]: State changed from crashed to starting
2013-09-08T01:46:58.347733+00:00 heroku[web.1]: Starting process with command `node server.js`
2013-09-08T01:47:00.425372+00:00 app[web.1]: LISTENING
2013-09-08T01:47:00.582876+00:00 app[web.1]: info: socket.io started
2013-09-08T01:47:59.952712+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-09-08T01:47:59.952459+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-09-08T01:48:01.523065+00:00 heroku[web.1]: Process exited with status 137
2013-09-08T01:49:02.687355+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:49:03.561165+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:48:01.532500+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-08T01:50:30.232096+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:50:29.121508+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:50:49.246283+00:00 heroku[web.1]: State changed from crashed to starting
2013-09-08T01:50:51.161871+00:00 heroku[web.1]: Starting process with command `node server.js`
2013-09-08T01:50:51.827825+00:00 app[web.1]: LISTENING
2013-09-08T01:50:51.945835+00:00 app[web.1]: info: socket.io started
2013-09-08T01:51:51.972737+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-09-08T01:51:51.972975+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-09-08T01:51:53.141508+00:00 heroku[web.1]: Process exited with status 137
2013-09-08T01:51:53.152332+00:00 heroku[web.1]: State changed from starting to crashed
2013-09-08T01:51:54.484616+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:51:55.899914+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:52:19.791497+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:52:20.616151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:52:39.086637+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:52:39.688008+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:51:54.508738+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:51:55.281138+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:54:03.778339+00:00 heroku[api]: Starting process with command `bash` by vietminhle98#gmail.com
2013-09-08T01:54:07.822098+00:00 heroku[run.9425]: Awaiting client
2013-09-08T01:54:07.856807+00:00 heroku[run.9425]: Starting process with command `bash`
2013-09-08T01:54:08.924087+00:00 heroku[run.9425]: State changed from starting to up
2013-09-08T01:54:24.533998+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:54:25.693218+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:54:28.098195+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:54:28.648493+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
2013-09-08T01:56:27.247187+00:00 heroku[run.9425]: Process exited with status 1
2013-09-08T01:56:27.257609+00:00 heroku[run.9425]: State changed from up to complete
That's the complete logs. I scanned through it and find 3 errors:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
at=error code=H20 desc="App boot timeout" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
at=error code=H10 desc="App crashed" method=GET path=/ host=fnboard.herokuapp.com fwd="122.109.112.187" dyno= connect= service= status=503 bytes=
I dont know why these three errors happen at the same time and I dont know what's wrong with my app, please help
My package.json:
{
"name": "fnBoard",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node server.js"
},
"dependencies": {
"socket.io": "0.9.x"
},
"engines": {
"node": "0.10.x",
"npm": "1.3.x"
}
}
Procfile:
web: node server.js
.gitignore:
node_modules
One of your log says:
2013-09-08T01:15:34.427477+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
To solve this, use the following for port number:
var port_number = server.listen(process.env.PORT || 3000);
app.listen(port_number);
Heroku sets a dynamically assigned port number to your app. Hence if you are strictly specifying a port number to be used, Heroku won't be able to do that.
However, you should set a port number so that your app can execute on localhost. Hence, the pipe to a specified port number '3000'.
Found this answer from Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
Maybe your wrong listen port?
Check your app port,look up if there is set to process.env.PORT || 3000.
I get this error when i write wrong command in the package.json :
i wrote :
"scripts" : {
"start": "index.js"
}
instead of :
"scripts" : {
"start": "node index.js"
}
when i wrote node index.js I'm all set.
Listening to 127.0.0.1 leads to the code=H20 desc="App boot timeout" problem for us. Changing the listening address to 0.0.0.0 solves the problem.
Also, don't use your own port, but instead use the environment variable PORT , which is passed to your app environment variables by heroku. Otherwise, you'll also get this problem.
Here is our node code:
const { PORT=3000, LOCAL_ADDRESS='0.0.0.0' } = process.env
server.listen(PORT, LOCAL_ADDRESS, () => {
const address = server.address();
console.log('server listening at', address);
});
So, try to log your listening address and port and check them firstly.

Resources