# H10 Error when deploying to Heroku

**URL:** <https://community.forestadmin.com/t/h10-error-when-deploying-to-heroku/547>\
**Category:** Help me!\
**Tags:** setup\
**Created:** [June 29, 2020, 7:37am UTC](https://community.forestadmin.com/t/h10-error-when-deploying-to-heroku/547 "2020-06-29T07:37:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eookuro](https://avatars.discourse-cdn.com/v4/letter/e/6bbea6/32.png) [@eookuro](https://community.forestadmin.com/u/eookuro)\
**Post date:** [June 29, 2020, 7:37am UTC](https://community.forestadmin.com/t/h10-error-when-deploying-to-heroku/547/1 "2020-06-29T07:37:00Z")

</div>

I my Forestadmin instance currently runs locally but when I attempt to push it to heroku it results in an app crashed error.

## Expected behavior

Be able to view a production application on Heroku at admin-ga.herokuapp.com

## Actual behavior

It tells me the app crashed after running either `npm start` or `docker compose up` in the project directory.

## Failure Logs

```javascript
2020-06-28T18:46:53.568530+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:2:13)
2020-06-28T18:46:53.568530+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1138:30)
2020-06-28T18:46:53.568531+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2020-06-28T18:46:53.568531+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:986:32)
2020-06-28T18:46:53.568531+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2020-06-28T18:46:53.568532+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
2020-06-28T18:46:53.568532+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2020-06-28T18:46:53.577858+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-06-28T18:46:53.578082+00:00 app[web.1]: npm ERR! errno 1
2020-06-28T18:46:53.579127+00:00 app[web.1]: npm ERR! got-anyalo@0.0.1 start: `node ./server.js`
2020-06-28T18:46:53.579243+00:00 app[web.1]: npm ERR! Exit status 1
2020-06-28T18:46:53.579364+00:00 app[web.1]: npm ERR!
2020-06-28T18:46:53.579451+00:00 app[web.1]: npm ERR! Failed at the got-anyalo@0.0.1 start script.
2020-06-28T18:46:53.579527+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-06-28T18:46:53.587056+00:00 app[web.1]: 
2020-06-28T18:46:53.587194+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-06-28T18:46:53.587256+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-06-28T18_46_53_580Z-debug.log
2020-06-28T18:46:53.632074+00:00 heroku[web.1]: Process exited with status 1
2020-06-28T18:46:53.668237+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-29T00:23:02.620504+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-29T00:23:06.984581+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-29T00:23:10.710792+00:00 app[web.1]: 
2020-06-29T00:23:10.710828+00:00 app[web.1]: > got-anyalo@0.0.1 start /app
2020-06-29T00:23:10.710828+00:00 app[web.1]: > node ./server.js
2020-06-29T00:23:10.710829+00:00 app[web.1]: 
2020-06-29T00:23:12.527742+00:00 app[web.1]: /app/node_modules/express-jwt/lib/index.js:20
2020-06-29T00:23:12.527770+00:00 app[web.1]: if (!options || !options.secret) throw new Error('secret should be set');
2020-06-29T00:23:12.527770+00:00 app[web.1]: ^
2020-06-29T00:23:12.527771+00:00 app[web.1]: 
2020-06-29T00:23:12.527772+00:00 app[web.1]: Error: secret should be set
2020-06-29T00:23:12.527772+00:00 app[web.1]: at module.exports (/app/node_modules/express-jwt/lib/index.js:20:42)
2020-06-29T00:23:12.527773+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:35:9)
2020-06-29T00:23:12.527773+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1138:30)
2020-06-29T00:23:12.527773+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2020-06-29T00:23:12.527774+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:986:32)
2020-06-29T00:23:12.527774+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2020-06-29T00:23:12.527774+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1026:19)
2020-06-29T00:23:12.527775+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:72:18)
2020-06-29T00:23:12.527775+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:2:13)
2020-06-29T00:23:12.527775+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1138:30)
2020-06-29T00:23:12.527776+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2020-06-29T00:23:12.527776+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:986:32)
2020-06-29T00:23:12.527776+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2020-06-29T00:23:12.527777+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
2020-06-29T00:23:12.527777+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2020-06-29T00:23:12.559440+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-06-29T00:23:12.559981+00:00 app[web.1]: npm ERR! errno 1
2020-06-29T00:23:12.561830+00:00 app[web.1]: npm ERR! got-anyalo@0.0.1 start: `node ./server.js`
2020-06-29T00:23:12.562068+00:00 app[web.1]: npm ERR! Exit status 1
2020-06-29T00:23:12.562335+00:00 app[web.1]: npm ERR!
2020-06-29T00:23:12.562549+00:00 app[web.1]: npm ERR! Failed at the got-anyalo@0.0.1 start script.
2020-06-29T00:23:12.562751+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-06-29T00:23:12.580396+00:00 app[web.1]: 
2020-06-29T00:23:12.580681+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-06-29T00:23:12.580843+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-06-29T00_23_12_564Z-debug.log
2020-06-29T00:23:12.674711+00:00 heroku[web.1]: Process exited with status 1
2020-06-29T00:23:12.725061+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-29T04:58:22.718120+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=admin.gotanyalo.com request_id=8b44f216-7c7e-4333-bcb3-45be494552a5 fwd="23.242.103.84" dyno= connect= service= status=503 bytes= protocol=https
2020-06-29T04:58:23.022495+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=admin.gotanyalo.com request_id=6a7556a3-551c-4fcc-a1d2-c31f92b5f7ca fwd="23.242.103.84" dyno= connect= service= status=503 bytes= protocol=https
2020-06-29T05:15:16.242527+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=admin.gotanyalo.com request_id=a1de69ed-949d-4b1e-8d6b-7696accacbd6 fwd="23.242.103.84" dyno= connect= service= status=503 bytes= protocol=https
2020-06-29T05:15:16.510077+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=admin.gotanyalo.com request_id=044d40e6-12e9-4e26-ac7a-19b371bfa3d4 fwd="23.242.103.84" dyno= connect= service= status=503 bytes= protocol=https

```

## Context

Please provide any relevant information about your setup.

- Package Version: 0.0.1
- Express Version: 4.16.3
- Sequelize Version: 6
- Database Dialect: postgreSQL
- Database Version: 6.1.0
- Project Name: gotanyalo

---

<div class="post-metadata">

**Author:** ![anon94532230](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon94532230](https://community.forestadmin.com/u/anon94532230)\
**Post date:** [June 29, 2020, 7:53am UTC](https://community.forestadmin.com/t/h10-error-when-deploying-to-heroku/547/2 "2020-06-29T07:53:37Z")

</div>

Hi @eookuro !  
Is your `FOREST_AUTH_SECRET` set in the `.env` file ?  
Did you follow **both** of those page of the documentation ?

1. [https://docs.forestadmin.com/documentation/how-tos/setup/deploy-to-production-on-heroku](https://docs.forestadmin.com/documentation/how-tos/setup/deploy-to-production-on-heroku)

2. [https://docs.forestadmin.com/documentation/reference-guide/how-it-works/environments#deploying-to-production](https://docs.forestadmin.com/documentation/reference-guide/how-it-works/environments#deploying-to-production)

---

<div class="post-metadata">

**Author:** ![eookuro](https://avatars.discourse-cdn.com/v4/letter/e/6bbea6/32.png) [@eookuro](https://community.forestadmin.com/u/eookuro)\
**Post date:** [June 29, 2020, 9:44am UTC](https://community.forestadmin.com/t/h10-error-when-deploying-to-heroku/547/3 "2020-06-29T09:44:59Z")

</div>

Thanks, I didn’t basically skipped over the vars part by mistake, opps. I got it up and running now, just have to figure out an error on the server.

Nonetheless thank you so much @anon94532230 for taking your time out and answering my question so quickly!! You are awesome.

---

<div class="post-metadata">

**Author:** ![anon94532230](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon94532230](https://community.forestadmin.com/u/anon94532230)\
**Post date:** [June 29, 2020, 9:45am UTC](https://community.forestadmin.com/t/h10-error-when-deploying-to-heroku/547/4 "2020-06-29T09:45:31Z")

</div>

Glad to hear it worked out 🙂
