React app that runs locally crashes on Heroku: H10 "App crashed" - javascript

My React application runs fine locally, but crashes on Heroku. Here are the logs:
2020-09-02T22:40:08.920880+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=corona-charts.herokuapp.com request_id=d493717f-dd9d-4a20-ad1f-76f877acbd8d fwd="174.67.238.38" dyno= connect= service= status=503 bytes= protocol=https
2020-09-02T22:41:00.972039+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=corona-charts.herokuapp.com request_id=28651997-4ff3-43ed-810b-6059f0dfae6e fwd="17
You can find all the code for my React app here: https://github.com/SirIsaacNeutron/us-corona-charts. The Heroku link is http://corona-charts.herokuapp.com.
I added the "https://github.com/mars/create-react-app-buildpack.git" buildpack that I apparently needed to add, but the app still crashes. Here are the buildpacks I used:
the buildpacks I used
The only cause of this problem that I can think of is the charts I am using. In the past, sometimes my local app crashed if I hovered over them while starting the app, although I haven't had this problem at all on my local version for a while.
I really appreciate any help you can give me. Thank you.

When using create-react-app and deploying to
dont delete the favicon.ico and manifest.json
also in package.json above scripts insert "engines": {
"npm": "6.x",
"node": "12.x"
},
//NOTE CHECK YOUR NODE AND NPM VERSIONS BY TYPING npm -v and node -v for accurate versions//
Dont add other scripts or change the start, build scripts!
This should clear all h10 errors when deploying to heroku, if they dont i suggest you create a new directory and copy your files there and start over, this link is a great guide to deploy
https://dev.to/smithmanny/deploy-your-react-app-to-heroku-2b6f

Related

Favicon error when checking heroku logs. App won't open

2023-02-04T23:44:59.721312+00:00 app[web.1]: Node.js v18.13.0
2023-02-04T23:44:59.863463+00:00 heroku[web.1]: Process exited with status 1
2023-02-04T23:44:59.923817+00:00 heroku[web.1]: State changed from up to crashed
2023-02-04T23:44:59.726175+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=ancient-fjord-54261.herokuapp.com request_id=889838b4-68b1-4f29-a43b-69a1a596ebdf fwd="75.97.100.189" dyno=web.1 connect=0ms service=28172ms status=503 bytes=0 protocol=https
2023-02-04T23:45:05.030038+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ancient-fjord-54261.herokuapp.com request_id=44e68370-195a-4e1e-97c7-66a443516f57 fwd="75.97.100.189" dyno=web.1 connect=5001ms service= status=503 bytes= protocol=https
Here's the code in my app.js. I pushed this and the other files to Heroku. Heroku CLI updated, all packages installed. Compared my app.js to the get-started index.js and made some changes to my app.js and still getting the error and won't open.
I'm doing a course on udemy for web development and its not updated for this year, so I'm having to troubleshoot every now and then. First time on stackoverflow so I need a little bit of help.
Can anyone help me with fixing this or provide me with some links to help out with troubleshooting?

how to fix 503 error on heroku PERN stack?

This is my first attempt at building a full stack application, please help:(. This is my github repo. I'm following this tutorial, but I get a 503 error appearing in the chrome developer tools console when I'm trying to SELECT * FROM todo. I can read the information in my database table through heroku cli & dataclips but it does not work in the heroku app. This is the link to my heroku app, I think the problem is in db.js or index.js but I don't know how to diagnose the problem.
This appears in my heroku cli:
2022-08-20T03:20:29.059619+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/getall" host=bag2.herokuapp.com request_id=0dad4a29-61b0-487a-857d-53157e5907df fwd="155.69.177.63" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https

I ran into application error after i deployed Node js successfully on Heroku [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
This is my first code using node, it worked fined on locahost:3000
here is the error after I checked the log:
```2021-08-31T11:16:54.000000+00:00 app[api]: Build succeeded
2021-08-31T11:16:57.474525+00:00 heroku[web.1]: Starting process with command `npm start`
2021-08-31T11:16:59.311657+00:00 app[web.1]: npm ERR! missing script: start
2021-08-31T11:16:59.314538+00:00 app[web.1]:
2021-08-31T11:16:59.314674+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-08-31T11:16:59.314721+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-08-31T11_16_59_312Z-debug.log
2021-08-31T11:16:59.351913+00:00 heroku[web.1]: Process exited with status 1
2021-08-31T11:16:59.406151+00:00 heroku[web.1]: State changed from starting to crashed
2021-08-31T11:17:31.920808+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=web-facebock.herokuapp.com request_id=a8bc0829-78b8-4ed9-93f4-c389ee0dcb39 fwd="197.210.77.72" dyno= connect= service= status=503 bytes= protocol=https
2021-08-31T11:17:32.247223+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=web-facebock.herokuapp.com request_id=d15e7971-6164-4dec-b761-0fd33b075dc4 fwd="197.210.76.123" dyno= connect= service= status=503 bytes= protocol=https```
Your package.json needs to contain:
"scripts": {
"start": "node your-script.js"
}
Start script missing error when running npm start
this question was answered similarly with more details.

getting a 503 error when uploading to heroku with my nodejs application

I have been struggling to get my app loaded to heroku for the past couple of days. I get over one hurdle and then meet another. Now I am getting a the following error.
Failed to load resource: the server responded with a status of 503 (Service Unavailable) /favicon.ico
On the logs I am getting these error messages.
2018-04-11T08:13:48.238214+00:00 app[web.1]: > rock-paper-scissors#1.0.0 start /app
2018-04-11T08:13:48.331598+00:00 app[web.1]: Server has started.
2018-04-11T08:13:48.238216+00:00 app[web.1]:
2018-04-11T08:13:48.238198+00:00 app[web.1]:
2018-04-11T08:14:46.646952+00:00 heroku[web.1]: State changed from starting to crashed
2018-04-11T08:14:46.571274+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-04-11T08:14:46.629369+00:00 heroku[web.1]: Process exited with status 137
2018-04-11T09:38:48.218885+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=brianpat-rock-paper-scissors.herokuapp.com request_id=0db40b3c-c918-4a3d-9a4d-f3a5fcf69bc8 fwd="94.174.32.117" dyno= connect= service= status=503 bytes= protocol=https
2018-04-11T09:38:48.541351+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=brianpat-rock-paper-scissors.herokuapp.com request_id=ecf56ae7-84e6-43a0-9a77-3e9f9a7f538f fwd="94.174.32.117" dyno= connect= service= status=503 bytes= protocol=https
Yesterday I was getting a Method not Allowed error and now I am not sure if it has moved on or not. Not sure if this is my end or whether this is a maintenance issue with heroku? Possibly my end. I have tried looking for the same error on Stackoverflow but they have not proved helpful. Any help would be appreciated.

How to deploy react js single page application (SPA)

I use react router make single page application, and I try to build it with npm run build then I upload build folder to my web-server but my website just shows background. I want to know how to make it work.
2017-04-26T19:06:27.864737+00:00 app[web.1]: npm ERR! Or if that isn't
available, you can get their info via:
2017-04-26T19:06:27.864910+00:00 app[web.1]: npm ERR! npm owner ls notes-app-client
2017-04-26T19:06:27.865077+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-04-26T19:06:27.870949+00:00 app[web.1]:
2017-04-26T19:06:27.871279+00:00 app[web.1]: npm ERR! Please include the
following file with any support request:
2017-04-26T19:06:27.871450+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2017-04-26T19:06:27.993054+00:00 heroku[web.1]: State changed from starting to
crashed 2017-04-26T19:06:42.961236+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=educationapp.herokuapp.com
request_id=72015192-8122-4fba-beb0-69c8f1e38129 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
2017-04-26T19:06:43.534651+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=educationapp.herokuapp.com
request_id=83684431-92be-4080-a2f8-7165e21f6c72 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
2017-04-26T19:14:57.478915+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=educationapp.herokuapp.com
request_id=022a219d-2299-4d23-b713-6bb75497f0e6 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
2017-04-26T19:14:57.922975+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=educationapp.herokuapp.com
request_id=ae9bf961-22a9-47f8-be5d-234d97f83ca3 fwd="49.228.99.168" dyno=
connect= service= status=503 bytes= protocol=https
Heroku don't have official deployment buildpack for React apps. So you have to use create-react-app-buildpack by Mars Hall.
Here is the link to get this.
Please follow this documentation. It will help you if you have started your development using create-react-app.

Categories

Resources