How to get logs for Application Error on Heroku - node.js

I have been trying to redeploy my app hosted on Heroku.
On every redeploy i was getting "Your app was successfully deployed."
But on opening the page i was getting:
An error occurred in the application and your page could not be served.
Please try again in a few moments.
If you are the application owner, check your logs for details.
On opening the logs under the 'Activity' tag gave me logs but it had nothing about what went wrong.
How would one get to know whats causing application error.

We could get the logs for Heroku easily from heroku shell. To get 'heroku shell' on you computer, install heroku toolbelt.
One installed, from 'cmd' login to heroku:
heroku login
Then you could get the logs:
heroku logs --app APPNAME
This works irrespective of whether you use git, github or dropbox.

Related

Heroku Deployment : M.E.R.N Stack application only works locally even after deploying to Heroku

When I run the command Heroku open in Git, Heroku will serve the Login page only and won't allow the "Login With Spotify" button to route to the Spotify Oauth page onClick.
I also get the error "xhr.js:178 GET http://localhost:3000/auth/spotify net::ERR_CONNECTION_REFUSED in the developer console.
The app only works locally when I run nodemon server to start the Node.js side(http://localhost:3000) and yarn start on the React client-side(http://localhost:3001). If those two servers aren't running Heroku will not properly deploy my app.
Application view after Heroku open is executed through Git
Developer console error that occurs onClick to the "Login With Spotify" button without the servers running on Heroku open

Logs eventsource failed

I create a nodejs app.
heroku local web works perfect.
However when I pushed it to heroku and open the application, error message pops up
ui error message
When I tried heroku logs --tail, another error shows up on the console
console error.
Please help me fix this, thank you!
I am the author of this post and I figured out where the problem is by executing
heroku run bash and manually restarting the program and soon observed the error in the output.
It was because I omitted installing one dependency, which caused the nodejs program fail to start.
However, the output of heroku logs --tail still needs improving. It does not return anything useful other than a 400 error.

heroku angular deployment cannot find dist/app-name/index.html

So I'm trying to deploy an angular 6 app on heroku, and I followed these steps:
this and this.
According to the heroku deployment logs, it says the build was successful. But when I try to access, the web page only returns Not found.
When I checked heroku logs, this was the result:
I'm pretty sure I followed all the steps correctly. So what am I doing wrong/missing here?

How to check errors log on heroku? (nodejs app)

Where can I check what error my nodejs app is producing?
I dont have that error on my local machine, and heroku web worker only returns to browser:
"Internal Server Error"
How can I find out what is this error about?
You can run heroku logs command or use add-ons like Papertrail to manage your logs.
If you error has an error code you can find more info about it in Heroku Error Codes

Heroku deploy notworking

I am having problems with my initial app deployment on Heroku. I've been through both the info in the dev center and Getting Started with Node.js on Heroku. While typing 'heroku open' within the dist directory I get a page that pops up in my browser with the message: Heroku | Welcome to your new app Refer to the documentation if you need help deploying.
Why isn't my site popping up?

Resources