S
S
Sasha Yashchuk2019-05-13 11:22:29
JavaScript
Sasha Yashchuk, 2019-05-13 11:22:29

How to understand why the application deployed on heroku does not work?

Good day to all! I did a test task for one company, deployed it on heroku, checked it a hundred times from my computer, from my phone, from my girlfriend's phone, from my friend's phone. Everything is working. I sent it to the employer for verification, they send me an answer that it doesn’t work with the picture 5cd9291d8da12421310140.jpeg
, I don’t know what could be wrong ... Can someone tell me what the problem is?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sasha Yashchuk, 2019-05-13
@Alex_bliznec

As a result, thanks to good people, Alexander Wolf and hzzzzl managed to solve the problem. To do this, it took:
1. Get the application logs, through the terminal using the command heroku logs --app "name of your application on heroku" or on heroku itself 5cd92f76f24fc732943810.pngAn important detail, if you work in the terminal, you need to install the heroku package (npm i heroku), npm i heroku-cli is outdated as far as I understand.
2. There are a lot of logs, paste them into pastebin, then here
3. We find an error. In my case, the error was due to the fact that the mongoose model had a {email: {required: true}} field, so the email was not passed, which caused the error.
4. We wrap the code blocks related to working with the database in try / catch in order to catch the error at an early stage.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question