Application error when deploying to Heroku

Hi there

I’m getting an error when deploying the server from Heroku (see screenshot)
(Odyssey Lift-Off Part 5)

The address is https://server-catstronauts-julia.herokuapp.com

If I can have help and guidance it would be great :slightly_smiling_face:

Thank you
Julia

Hey Julia, happy to help troubleshoot. Would you mind sharing your GitHub repo for the server code?

Could you also paste the error you’re getting in the logs? You can find the logs using these instructions.

Hi Michelle,

Thank you for your reply.

My Github repo: GitHub - julianoiret/odyssey-lift-off-part5-server: Odyssey Lift-off V - Server - Course Companion App

This is the error I get in the logs:



2022-09-04T19:47:39.553295+00:00 app[web.1]:     at /app/node_modules/apollo-server-core/dist/ApolloServer.js:176:73

2022-09-04T19:47:39.553295+00:00 app[web.1]:     at Array.map (<anonymous>)

2022-09-04T19:47:39.553296+00:00 app[web.1]:     at ApolloServer._start (/app/node_modules/apollo-server-core/dist/ApolloServer.js:175:75)

2022-09-04T19:47:39.553296+00:00 app[web.1]:     at ApolloServer.listen (/app/node_modules/apollo-server/dist/index.js:56:20)

2022-09-04T19:47:39.553296+00:00 app[web.1]:     at startApolloServer (/app/src/index.js:17:38)

2022-09-04T19:47:39.553296+00:00 app[web.1]:     at Object.<anonymous> (/app/src/index.js:25:1)

2022-09-04T19:47:39.661687+00:00 heroku[web.1]: Process exited with status 1

2022-09-04T19:47:39.896758+00:00 heroku[web.1]: State changed from starting to crashed

2022-09-05T00:33:20.215101+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=server-catstronauts-julia.herokuapp.com request_id=b218605c-4138-4d06-ae53-e1da447651e9 fwd="203.13.23.10" dyno= connect= service= status=503 bytes= protocol=https

2022-09-05T00:33:20.603904+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=server-catstronauts-julia.herokuapp.com request_id=485f34eb-3f31-42b5-a8fa-f597ce8c999a fwd="203.13.23.10" dyno= connect= service= status=503 bytes= protocol=https


Hi @MichelleMabuyo

Do you have any updates on this?
Thank you
Julia

Hey Julia, my apologies for the delay, I was away last week. Just got a chance to review your code and try pushing it to Heroku, in the state it’s currently in.

I was able to deploy it with no issues, you can find it here: https://thawing-dawn-83137.herokuapp.com/ using your code, with no changes.

Have you tried forcing another deploy in Heroku (try a manual deploy)? Is it working locally?

Hi Michelle,

Thank you for your help.
After retrying 3 times, this is finally working. No idea what was the issue but I suspect having forgotten to reveal the masked values when copying and pasting the value in the config vars (actually I’m not sure if it could be a problem).

Thank you for always taking the time to help people.
This project is great!